-
Notifications
You must be signed in to change notification settings - Fork 312
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
A header-based SW installation #685
Comments
On #684 I pitch the idea of:
This would only require |
I don't really like the idea of having in this case the And specifically for the fonts usecase, allowing subresource headers to register a ServiceWorker is what makes this all work transparently. I'm not entirely sure what we would gain by requiring any website that wants to benefit from a fonts service worker to explicitly specify this. Shouldn't websites that don't have their own service worker also be able to benefit from services they rely on having service workers? |
I don't think it does. Your site should work offline after install. Since font requests happen when the font is requested, you could end up with a serviceworker installing without a request to the font service.
Hmm, yeah, that would be nice. |
@jungkees I lost track of this feature. Was there any other relevant discussion or pushback? We are discussing with partners and for some a header based SW installation is a must have (e.g. Google Fonts: not a destination website, integration point being a link rel stylesheet) |
I think it has just not been discussed for a while. I added this issue to the f2f agenda. If there's not enough time to cover this, I'll at least share it with the attendees so we can follow up on the discussion. |
F2F: Header: |
@annevk How would I go about actually spec-ing this? The But what do we do about the Link header. https://www.w3.org/wiki/LinkHeader makes it sound like it isn't actually specified anywhere (other than some old version of HTTP 1.1). So how/where should Link be specified? |
Perhaps, following how it's done for preload would work? |
Ah yes, thanks. I must have not been searching for the right things. That looks helpful for inspiration. |
The header is defined in https://tools.ietf.org/html/rfc5988. And yes, we'd have to modify the HTML standard to properly define the element. |
FYI I wrote a PR for adding |
Were tests written for this as well? |
Yes, I believe the only things left to do here are I think the cleanup from #1098 and IANA registering the new link relation type. |
It's been discussed as part of the
navigator.connect()
and decided to be proposed as an extension to SW API (v2).Assuming a communication between a client SW and a service SW is enabled through the efforts in
navigator.connect()
's persistent channel messaging and the fallThrough requests proposal, the client SWs would need to use readily installed service SWs whenever possible.Here's a proposal to allow services to install their SWs using HTTP headers when any of their resources are requested: https://github.com/mkruisselbrink/navigator-connect/blob/gh-pages/explainer.md#mommy-where-do-service-workers-come-from
The text was updated successfully, but these errors were encountered: