I have a set of calculators written in JS on a page:
http://www.slymail.org/vinocalc.html
The page is designed to be downloaded and used offline, or simply saved as a file for speed of access and reliability (not always on internet connections).
Anyway, I would like to store a file on the server, which contains the current version number (such as 2.0). That's all the file will contain. Then when the page is loaded, it will access that version file, and compare the version in that file to the hardcoded current version number.
The upshot is, if somebody is using the file from their local machine, the code tries to open the version file on the server (if it fails, we assume we're offline), it the compares the current version to the known version being used, and if they're not the same, displays a descrete message on the page somewhere.
Of course, if the user is offline, I don't want the page to delay loading while it tries to load the version file and times out, so the Ajax will have to do that in the background.
As you might have guessed, I'm new to ajax, but do have some JS experience.
I've been doing a lot of googling, and think that a modification of the code here may be way to go:
http://www.openhosting.co.uk/articles/webdev/5899/
Any help is greatly appreciated.
Cheers