<?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>27482</bug_id>
          
          <creation_ts>2014-12-02 13:10:51 +0000</creation_ts>
          <short_desc>Have appcache be bypassed when the navigation is under the scope of a service worker</short_desc>
          <delta_ts>2015-09-29 16:21:54 +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>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jungkee Song">jungkees</reporter>
          <assigned_to name="Jungkee Song">jungkees</assigned_to>
          <cc>d</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115784</commentid>
    <comment_count>0</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2014-12-02 13:10:51 +0000</bug_when>
    <thetext>Service worker folks have had a discussion about what the UA should do when both a service worker registration and an application cache are available for the navigation of resources:
https://github.com/slightlyoff/ServiceWorker/issues/275

Particularly for the following requirement:
&gt; If the navigation is under the scope of a SW, appcache is completely bypassed, regardless of whether the navigation uses the SW.

I presume the following condition in brackets added to the otherwise-branch of the below algorithm will satisfy that:
https://html.spec.whatwg.org/multipage/syntax.html#the-before-html-insertion-mode
- A start tag whose tag name is &quot;html&quot;

&quot;; otherwise, if there is no such attribute, or its value is the empty string, or resolving its value fails, [or the result of running Match Scope algorithm passing the Document&apos;s address (url) is non-null], run the application cache selection algorithm with no manifest.&quot;

Match Scope returns a matching service worker registration taking a url as an argument, and is defined here: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#scope-match-algorithm

Could you comment on it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115851</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-12-03 19:56:00 +0000</bug_when>
    <thetext>Seems fine to me in principle.

Could we rename &quot;match scope&quot; to something that explicitly references Service Workers, so it&apos;s more clear what it means?

Also, why would we run the match scope algorithm, rather than just checking whether there&apos;s an assigned service worker?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115900</commentid>
    <comment_count>2</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2014-12-04 02:51:15 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #1)
&gt; Seems fine to me in principle.
&gt; 
&gt; Could we rename &quot;match scope&quot; to something that explicitly references
&gt; Service Workers, so it&apos;s more clear what it means?
&gt; 

Yes, I&apos;ll rename it to &quot;match service worker registration&quot;. Actually, a service worker registration is keyed by scope, so it not only clarify the name to the external caller context but also explains what it exactly does.

&gt; Also, why would we run the match scope algorithm, rather than just checking
&gt; whether there&apos;s an assigned service worker?

The &quot;match service worker registration&quot;algorithm given a url actually checks whether there exists a service worker registration that can cover the url space. The part that makes this matching registration&apos;s active service worker be the service worker controlling the given client is defined elsewhere (in handle fetch algorithm).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115906</commentid>
    <comment_count>3</comment_count>
    <who name="Jungkee Song">jungkees</who>
    <bug_when>2014-12-04 04:13:39 +0000</bug_when>
    <thetext>(In reply to Jungkee Song from comment #2)
&gt; (In reply to Ian &apos;Hixie&apos; Hickson from comment #1)
&gt; &gt; Seems fine to me in principle.
&gt; &gt; 
&gt; &gt; Could we rename &quot;match scope&quot; to something that explicitly references
&gt; &gt; Service Workers, so it&apos;s more clear what it means?
&gt; &gt; 
&gt; 
&gt; Yes, I&apos;ll rename it to &quot;match service worker registration&quot;. Actually, a
&gt; service worker registration is keyed by scope, so it not only clarify the
&gt; name to the external caller context but also explains what it exactly does.
&gt; 

Addressed: https://github.com/slightlyoff/ServiceWorker/commit/2b123e8177a2dd1e56a41c0fe2ea29c8fb97d731</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123052</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2015-09-02 19:03:41 +0000</bug_when>
    <thetext>Assigning to Jungkee since in https://www.w3.org/Bugs/Public/show_bug.cgi?id=28737#c3 he said he&apos;d be willing to make a PR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123356</commentid>
    <comment_count>5</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2015-09-29 16:21:54 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/pull/184</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>