Re: Auto-refresh Netscape 4.79 browser on Linux in C application



philbo30 wrote:
[...]
In a nutshell, the browser window needs to be automatically refreshed
as soon as my application completes its processing. In other words,
the application gets a new last step, the web-page refresh.

I suspect that this is a call to a Netscape function, but it might be
possible with a system() call as well. Thoughts?

You want to look up timed events in Javascript. Basically, only the web
browser has the ability to initiate a data transfer[1], so you need to have a
script on the web page periodically poll the server for more data. It's all
spectacularly horrible, but can be done reasonably efficiently and in a
totally standards-compliant way. You don't even have to refresh the web page;
you can have the browser fetch the data in plain text format, parse it, and
update the relevant portions.

(You may wish to have a look at GWT, the Google Web Toolkit. It allows you to
write all the browser-side scripting in Java, neatly abstracting away all the
platform-specific hacks you need to make traditional Javascript scripting work
reliably. Also, you *don't* need Java installed on either the browser or the
server --- it works by converting the Java code into Javascript. All the
advantages of proper types, with none of the disadvantages of the bloated Java
runtime. It'll talk happily to your php script.)

However, you are making life *incredibly* more difficult for yourself by using
Netscape 4. That browser is fantastically old and buggy. *Anything* else would
be an improvement. Really. Its style *** support is incomplete and what
there is is broken, its Javascript support is incomplete and what there is is
broken, its rendering algorithms are incomplete and what there is, etc...
mention Netscape 4 to a modern web designer and they practically go white with
terror. I'm not kidding. If it's at all possible to use something else, it's
worth your while to do so.



[1] There are some horrible hacks that involve leaving the connection open and
pushing multipart data down... but they're all even more spectacularly
horrible, as well as unreliable. Not worth using, in my opinion.

--
┌── dg@cowlark.com ─── http://www.cowlark.com ───────────────────

│ "There does not now, nor will there ever, exist a programming language in
│ which it is the least bit hard to write bad programs." --- Flon's Axiom
.