O'Reilly logo

The Book of JavaScript, 2nd Edition by thau!

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automatically Updating a Web Page When a Server-Side File Changes

Figure 16-15 and Figure 16-16 demonstrate how to use HEAD calls, server-side file reading, and the cache-tricking technique to read a file from a webserver, display its contents, and update the contents whenever the file on the server changes. This type of application is useful whenever more than one person can update a file on a webserver—for example, if two people have access to the same To Do list.

Client-side checking for updated server-side file

Figure 16-15. Client-side checking for updated server-side file

Figure 16-15 lists the client-side portion of the application. Clicking the Read the File button in the form at the bottom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required