IncVerNum Test Obsolete UnDoMan RemoveMan simple full

All UseReLoad Play FreeCell Help
View simple.manifest
View full.manifest
Current Version= Not Set
Last FreeCellGui Command Response


Log of Information Messages and Application events Bottom
Top

Application(Offline) Cache Test 

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:

  1. Reporting all Application Events in the Log area above
    1. A table with six columns
      1. Date/Time - time of the entry.
      2. Manifest - name of the Manifest (Application Cache entry) that is active.
      3. Event - name (type) of the event or Info Msg (an information log entry).
      4. Online - Yes if the browser is reporting it is online (navigator.online) or No if offline.
      5. Status - the window.applicationCache.status (ie. idle, uncached, downloading ... at the time of event or info entry).
      6. Message - Additional information.
    2. Saved across internally generated page loads (radio button and swaps) in localStorage. If onunload is supported, across changes to other pages.
    3. 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.
    4. All log entries are also recorded in the browsers console so can be correlated with the information that some browsers record.
  2. 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. 
    1. apc_version : Monotonically increasing to label an instance of a logical set of changes. Note the following are all set equal to this value.
    2. $th_apc_version in the master entries https://freecellgui.com/th_apcsimple.php  or https://freecellgui.com/th_apcfull.php  which ever is active (radio button selected).
    3. Instance version file for each manifest, simple_version or full_verstion which ever is active (radio button selected)..
    4. 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".
  3. Having a minimum Manifest file (simple.manifest) that contains a version valuess. 
  4. There is also a more comprehensive Manifest (full.manifest). 
  5. The manifests can be viewed by clicking on the view  links above.
  6. A button (Change ) that executes function selected by Radio buttons 
    1. IncVerNum: that increments the javascript and the manifest version numbers to the same value. The incriminating is done on the host,  (freecellgui.com) .
    2. Test Obsolete: Tests that removing and referencing the active manifest does Obsolete the cache associated with manifest. 
    3. UnDoMan: Restores previously Removed manifest.
    4. 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. 
  7. 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.
  8. Two Radio buttons to switch between simple and full manifests. 

Operation 

  1. Every time  this page is loaded:
    1. 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.
    2.  Checks that the Application Cache and the javascript file are the correct (expected) version.
      1.   The results are logged.
      2.  If not the same, and the cache is not uncached, means the cache content is incorrect.
        1.  Can occur if the cache-controls are not set correctly on Chrome and Edge
        2. See 5.8.4.6.2 of http://www.w3.org/TR/2009/WD-html5-20090212/offline.html where it says " HTTP caching rules, such as Cache-Control: no-store , are ignored for the purposes of the application cache update process". During download not only will entries be retrieved from HTTP cache they will be fetched from old instances of  the application cache. 
  2. 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.. 
  3. Increment the version a couple of times then click the other radio button and repeat the above.
  4. Disconnect from the Internet.
  5. Observe the Online Log column should start reporting "no" .
  6. click the other radio button and browser should load the other manifest. Name reported in the Manifest column should change.
  7. Click "Pause"  and Leave page and come back and version number of cache should remain same.  
  8. Selecting the "All" checkbox shows all messages. UnChecking hides superfluous messages.
  9. 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..
  10. 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
  1. 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.
  2. Errors  are highlighted in "Red".
  3. The infomsg "Application Cache Failed?" is issued when the test thinks the applicationCache should not be uncached. 
Top