Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch useCache to an enum #1104

Closed
jakearchibald opened this issue Apr 4, 2017 · 11 comments
Closed

Switch useCache to an enum #1104

jakearchibald opened this issue Apr 4, 2017 · 11 comments
Milestone

Comments

@jakearchibald
Copy link
Contributor

We're worried about fetch all importScripts on every navigation. It sounds really heavy and a waste of bandwidth.

New proposal. useCache values:

  • "never"
  • "imports"
  • "all"

It's a bit late in the day, but we all think this is a much safer change.

@wanderview
Copy link
Member

Gecko bug to avoid shipping boolean useCache: https://bugzilla.mozilla.org/show_bug.cgi?id=1353638

Gecko bug to switch to enum: https://bugzilla.mozilla.org/show_bug.cgi?id=1353636

@jakearchibald
Copy link
Contributor Author

I'm worried it isn't clear that useCache applies to updates, so I'm going to rename it updateViaCache. Objections welcome.

@jakearchibald
Copy link
Contributor Author

Service worker spec PR #1107

@wanderview
Copy link
Member

Just to clarify, is this also doing FB's request to bypass cache on register? The new name just made me wonder.

@jakearchibald
Copy link
Contributor Author

Nah, I haven't added that. But you're right, the naming makes even more sense considering that.

jakearchibald added a commit to jakearchibald/html that referenced this issue Apr 7, 2017
@jakearchibald
Copy link
Contributor Author

jakearchibald commented Apr 11, 2017

PR: #1107

jakearchibald added a commit to jakearchibald/html that referenced this issue Jun 6, 2017
domenic pushed a commit to whatwg/html that referenced this issue Jun 6, 2017
jungkees pushed a commit that referenced this issue Jun 7, 2017
 Changing useCache boolean to updateViaCache enum

Issue: #1104.
Tests: web-platform-tests/wpt#5515.
HTML change: whatwg/html@b5fcec0.
@jungkees
Copy link
Collaborator

jungkees commented Jun 7, 2017

SW change: c92c148. (merged)
HTML change: whatwg/html@b5fcec0. (merged)
Tests: web-platform-tests/wpt#5515. (underway)

@mfalken
Copy link
Member

mfalken commented Jun 9, 2017

We're confused that the service worker spec and the HTML spec seem to have contradicting definitions of updateViaCache in HTMLLinkElement.
(SW spec)

partial interface HTMLLinkElement {
  ...
  [CEReactions] attribute ServiceWorkerUpdateViaCache updateViaCache;
};

(HTML spec)

interface HTMLLinkElement : HTMLElement {
  ...
  [CEReactions] attribute DOMString updateViaCache;
};

It seems the HTMLLinkElement extension in the service worker spec is not needed since the HTML spec has it.

@jakearchibald
Copy link
Contributor Author

Ahh yes, we need to remove the one from the service worker spec. The HTML spec is the correct one.

@jungkees
Copy link
Collaborator

Yes, it's being addressed in #1110 (comment).

@jakearchibald
Copy link
Contributor Author

Tests landed web-platform-tests/wpt#5515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants