I'm quite new to javascript, but is it possible for my page to refresh only if it's content has changed? There are a few large pictures on the page and I don't want to refresh if there is no need.
no, not purely with javascript to my knowledge.
yes, using javascript and some server-side logic, e.g.:
use javascript to send a remote scripting/ajax call to the server, which would return the date modified or version id of the page in question. then if that date modified/id is newer than the currently loaded page, use javascript to reload the page.
jemminger is right: since the content is changing on the SERVER, the client (your page) will have to somehow communicate with the server to determine when it needs to be reloaded. The ajax call is certainly well-suited to the task.
There are other ways (i.e. RSS and "push" technology) that might also meet the requirements.
Tracy Dryden
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.