Skip to content

Commit

Permalink
Append Service-Worker header when fetching a SW
Browse files Browse the repository at this point in the history
  • Loading branch information
jungkees committed Oct 15, 2014
1 parent 8b493c2 commit 9445ff7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/service_worker/index.html
Expand Up @@ -1810,7 +1810,9 @@ <h1>Update</h1>
</ol>
</li>
<li>Let <var>r</var> be the associated <a href="https://fetch.spec.whatwg.org/#concept-request">request</a> of the result of invoking the initial value of <a href="https://fetch.spec.whatwg.org/#dom-request">Request</a> as constructor with <var>registration</var>'s <a href="#dfn-registration-script-url">registering script url</a>. If this throws an exception, reject <var>p</var> with it and set <var>registration</var>'s <a href="#dfn-registration-promise">registration promise</a> to null.</li>
<li>Set <var>r</var>'s <a href="https://fetch.spec.whatwg.org/#synchronous-flag">synchronous flag</a>.</li>
<li>Set <var>r</var>'s <a href="http://fetch.spec.whatwg.org/#concept-request-context">context</a> to <em>serviceworker</em>.</li>
<li>Append `<code>Service-Worker</code>`/`<code>script</code>` to <var>r</var>'s <a href="https://fetch.spec.whatwg.org/#concept-request-header-list">header list</a>.</li>
<li>Set <var>r</var>'s <a href="http://fetch.spec.whatwg.org/#skip-service-worker-flag">skip service worker flag</a> and <var>r</var>'s <a href="https://fetch.spec.whatwg.org/#synchronous-flag">synchronous flag</a>.</li>
<li>Let <var>response</var> be the result of running <a href="https://fetch.spec.whatwg.org/#concept-fetch">fetch</a> using <var>r</var>, forcing a network fetch if cached entry is greater than 1 day old.</li>
<li>If <var>response</var> is a <a href="https://fetch.spec.whatwg.org/#concept-network-error">network error</a>, then:
<ol>
Expand Down

1 comment on commit 9445ff7

@annevk
Copy link
Member

@annevk annevk commented on 9445ff7 Oct 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there agreement to have this header? With this name? I don't think so.

Please sign in to comment.