Onupdating animation

Rated 4.52/5 based on 943 customer reviews

However, in this example, "Refresh:" is specified on each retrieval, creating a continuous display.

Here is an example of a CGI program that performs the same operation as the previous HTML code: Remember, SSI directives cannot be included in a CGI program.

If the file does not contain another "Refresh:" header, there is no animation, because "Refresh:" is non-repeating. /usr/local/bin/perl $fortune = "/usr/local/bin/fortune"; $refresh_time = 10; print "Refresh: ", $refresh_time, "\n"; print "Content-type: text/plain", "\n\n"; print "Here is another fortune...", "\n"; print `$fortune`; exit(0); This is a repeating document, because a "Refresh:" header is specified every time the program is executed.

The program uses the UNIX fortune command, which generates a random fortune each time it is invoked.

Server push can be implemented in a CGI program through the use of the multipart/x-mixed-replace MIME type.

Both client pull and server push are supported only by Netscape Navigator (version 1.1 and higher) and Internet Explorer.

Animation depends on updating the browser's window at regular intervals with new material from the server.

Beyond specifying animations in markup, they're also easy to use in code so you can add professional looking transitions and visual effects to your Toolkit components and controls.

Although Java is being touted as the best way to do animation on the Web, you can also write CGI programs to produce animation.

Leave a Reply