To communicate about this test and Offline Cache, email apc@freecellgui.com
Tests the browser, this application is executing on, implementation of Application Cache by:
Reporting all Application Events in the Log area above.
A table with six columns
Date/Time - time of the entry.
Manifest - name of the Manifest (Application Cache entry) that is active.
Event - name (type) of the event or Info Msg (an information log entry).
Online - Yes if the browser is reporting it is online (navigator.online) or No if offline.
Status - the window.applicationCache.status (ie. idle, uncached, downloading ... at the time of event or info entry).
Message - Additional information.
Saved across internally generated page loads (radio button and swaps) in localStorage. If onunload is supported, across changes to other pages.
Cleared by clicking ClearLog button. Tip if going to leave page and want to preserve the Log click Pause and wait for Log Saved to appear in the Log before leaving.
All log entries are also recorded in the browsers console so can be correlated with the information that some browsers record.
Having version numbers (Javascript variables) in some of the files that are in the Manifests and checking if the correct version are being retrieved from the Application Cache.
apc_version : Monotonically increasing to label an instance of a logical set of changes. Note the following are all set equal to this value.
Instance version file for each manifest, simple_version or full_verstion which ever is active (radio button selected)..
simple_var_lm in file simple_varing_lm_file.js that has the default Cache Controls. To detect browsers that do not reliably download files with out "Cache-Control: max-age=0, must-revalidate".
Having a minimum Manifest file (simple.manifest) that contains a version valuess.
There is also a more comprehensive Manifest (full.manifest).
The manifests can be viewed by clicking on the view links above.
A button (Change) that executes function selected by Radio buttons
IncVerNum: that increments the javascript and the manifest version numbers to the same value. The incriminating is done on the host, (freecellgui.com).
Test Obsolete: Tests that removing and referencing the active manifest does Obsolete the cache associated with manifest.
UnDoMan: Restores previously Removed manifest.
RemoveMan: Copies and then deletes current manifest. If the manifest is then attempted to be loaded it will clear the associated application cache (obsolete it) and populate the http cache with files referenced by the page fetched.
A interval timer that checks for updates every 10 seconds (i.e calls applicationCache.update()). The Pause | Start button that starts and stops the checking.
Two Radio buttons to switch between simple and full manifests.
Operation
Every time this page is loaded:
Reports the status of the cache at page load time. If the Application Cache is not working this entry will be "uncached". Though if it is working it may be any of the status.
Checks that the Application Cache and the javascript file are the correct (expected) version.
The results are logged.
If not the same, and the cache is not uncached, means the cache content is incorrect.
Can occur if the cache-controls are not set correctly on Chrome and Edge
Select IncVerNum, click "Change" and "Start" to trigger the checking for updates. Observe that the cache gets swapped and updated application is loaded. May take upto 10 seconds to happen because of the interval check for updates. If doesn't change then the browser did not detect the change to the manifest. The host response to pressing the button are recorded in the log..
Increment the version a couple of times then click the other radio button and repeat the above.
Disconnect from the Internet.
Observe the Online Log column should start reporting "no" .
click the other radio button and browser should load the other manifest. Name reported in the Manifest column should change.
Click "Pause" and Leave page and come back and version number of cache should remain same.
Selecting the "All" checkbox shows all messages. UnChecking hides superfluous messages.
If online and Manifest has a Network section containing '*', Clicking the "Validate button will show the headers of all the files being cached with there status, and the key words and #comments in the log. Stale files (Last Modified differing from host lastmodified) and Cache Controls needed to have a reliable Apllication Cache on all major browsers will be highlighted in red..
To Exit click "Exit to pause and clear the Log from localStorage Then link to jsfreecell to exit cleanly. If you don't do this some Log data will remain in localStorage.
Comments on Results
Error in the Validity check means that there is something fhat causes Application to not work on some browsers.. Appears that some browsers do not care or check headers, and will cache if resource is available and no syntax errors.
Errors are highlighted in "Red".
The infomsg "Application Cache Failed?" is issued when the test thinks the applicationCache should not be uncached.