<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18609</bug_id>
          
          <creation_ts>2012-08-17 21:50:32 +0000</creation_ts>
          <short_desc>appcache: Enumerating appcaches</short_desc>
          <delta_ts>2014-09-08 20:50:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>art.barstow</cc>
    
    <cc>dbk</cc>
    
    <cc>hbambas</cc>
    
    <cc>ian</cc>
    
    <cc>michaeln</cc>
    
    <cc>mike</cc>
    
    <cc>slightlyoff</cc>
    
    <cc>slightlyoff</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72380</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-17 21:50:32 +0000</bug_when>
    <thetext>(From a developer on Google Docs:)

Google Docs Offline has multiple appcaches.  We have multiple caches because we have multiple editor applications (document picker, word processor, spreadsheet, presentation tool, drawing tool) each with its own javascript binary and release cycle.  We also have various variants of each application.  The variant used depends on various facts about the document being opened, each variant is suitable to open a wide class of documents.

One ‘special’ cache has a fallback entry covering our entire domain. The application served in this cache is capable of examining the URL used by the user and selecting the right cache to use.  It then redirects the user to a URL held in that cache.  When the applications it contains is started, it uses the history API to change the apparent URL to match the one the user originally navigated to.

The URLs in these caches are not ‘public’ URLs, they are known only to the launcher.  The URLs users routinely open while online do not bind to any of these caches.  We regularly examine the set of documents the solution has stored offline, calculate which set of caches is needed to open them, and manually update those caches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72524</commentid>
    <comment_count>1</comment_count>
    <who name="">michaeln</who>
    <bug_when>2012-08-22 01:23:56 +0000</bug_when>
    <thetext>We&apos;ve discussed what an API to do this could look like, some notes are here...
https://bugs.webkit.org/show_bug.cgi?id=67135</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77119</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-25 18:58:40 +0000</bug_when>
    <thetext>- api needs to be accessible in a window, worker, or shared worker context
- getting the list of appcaches needs to be async
- api needs to expose the manifest URL
- should be possible to tell when a cache update was last attempted (staleness)
- should be possible to force an update
- should be possible to get events from such updates (and maybe if such an
  update is triggered while it&apos;s already running,, start getting the events from 
  the previously-running update instance)
- should be possible to decommission a cache
- should be possible to create a new cache from manifest
- we shouldn&apos;t use the actual .applicationCache object for representing the cache 
  in the enumerated list, so that the app doesn&apos;t get confused if it finds events
  are already being fired on it

I expect I&apos;ll add this via NavigatorStorageUtils, and add that to WorkerNavigator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81402</commentid>
    <comment_count>3</comment_count>
    <who name="David Barrett-Kahn">dbk</who>
    <bug_when>2013-01-15 16:43:29 +0000</bug_when>
    <thetext>I think it&apos;s important to distinguish between aspects of this proposal which add convenience and those which add completely missing functionality.  The hard core of this proposal from my point of view is:

* Enumerate caches, get the manifest URL for each cache
* Allow the deletion of caches by manifest URL

The rest is useful, certainly, but can be achieved using iframe tricks already.  I&apos;d much rather have the two things above than see the proposal stall on the more ambitious items.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109440</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-07-28 23:38:03 +0000</bug_when>
    <thetext>Given ServiceWorkers, we might end up punting on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111109</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-05 21:57:46 +0000</bug_when>
    <thetext>Alex, do Service Workers provide the features described in comment 2 sufficient to satisfy the needs of David&apos;s team?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111111</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Russell">slightlyoff</who>
    <bug_when>2014-09-05 22:22:00 +0000</bug_when>
    <thetext>Yes, I believe that Service Workers do provide the requested flexibility. 

It&apos;s possible both to enumerate the cache objects and understand the state of the updated/waiting SW scripts using the provided API. These aren&apos;t 1:1 with the AppCache model, but combined I think they get you there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111178</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-08 16:57:47 +0000</bug_when>
    <thetext>Cool. Are the relevant APIs exposed outside the service worker? That was something David was saying would be quite useful, IIRC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111186</commentid>
    <comment_count>8</comment_count>
    <who name="David Barrett-Kahn">dbk</who>
    <bug_when>2014-09-08 17:50:20 +0000</bug_when>
    <thetext>Serviceworker certainly has this use case covered, although not in the particular way described in this bug.  Adding this back into AppCache wouldn&apos;t be worth it, as anybody attracted to manual cache management is certainly going to use service worker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111189</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-08 20:50:50 +0000</bug_when>
    <thetext>Roger. Marking this WONTFIX then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>