Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.8 KB

CHANGES.mdown

File metadata and controls

42 lines (30 loc) · 1.8 KB

Improvements / Changes over the Specification:

  • now-online and now-offline transition events fired at the cache host level (so document for my library) when a connectivity transition has been detected.

    BEWARE: these are very similar to the "online" and "offline" events introduced in Application Cache, described here on MDC and here in HTML5. For now, I will not transition to these events to prevent duplicate invocations. Developers that wish to use both, may simply register the same handler to both events, and be aware of the potential for duplication.

    function handler() { ... }
    document.addEventListener('online', handler, false);
    document.addEventListener('now-online', handler, false);
    
  • DataCache.getManagedItems returns an Array of all the items stored in the particular cache, with the form:

    { uri: <string>, item: <CacheItem> }
    
  • eachModificationSince will go back through everything if the lowVersion is null.

  • when the item callback for eachModificationSince is triggered the library provides a second parameter with the resolved URI of the item. This is because uri is missing from the CacheItem IDL.

  • navigator.removeRegisteredOfflineHandlers removes all registered local server handlers.

  • A standard set of Http Status values in Http.Status. For example:

    response.setStatus(200, Http.Status[200]); // "OK"
    
  • window.openNewDataCache() forces creating a new data cache with a new version number. This uses the same algorithm as creating a new data cache for an online transation.