Re: [slightlyoff/ServiceWorker] Take control over the very first page (#938)

> It should take control over this page right after it is activated

This wouldn't make sense as the default, but the activated SW can call `clients.claim()` to take control of pages.

> it should be able to be registered via http headers instead of Javascript.

It already can https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#link-type-serviceworker, however it doesn't block the page while the service worker installs.

Blocking the page would create a huge drop in performance, as your first render is gated on everything in the install step. Instead, we're encouraging a more progressive (and faster) model.

If you must, you could serve a loading page from the server, then refresh it once the service worker installs. But again, this creates a much slower user experience so we don't recommend it.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/938#issuecomment-236553111

Received on Monday, 1 August 2016 11:18:30 UTC