Re: [slightlyoff/ServiceWorker] Eliminating SW startup latency for common case (#920)

> Isn’t each GET bavigate going to be wasteful and encourage a more complicated pushState() navigation scheme for subsequent navigations? (Which would be problematic if we ever manage to tie other things to navigation, such as animations, apart from making sites more complicated.)

Realistically I think a complex application will still end up using pushState rather than doing fresh navigations on each page view. Keep in mind that the use case here is on URLs where getting the lastest server-side data is critical for the page to be "done", ie a news feed or other page that is expected to show real time information.

Even if you take out network latency there's a substantial price to be paid in terms of initializing client side JS (installing a bunch of prototype objects, etc). Apps may have features that cross page navigation (eg on Facebook chat tabs) where a fresh page view could be a disruptive experience (imagine you're half way through typing a message).

One thing that could mitigate this issue is to allow for a TTL for pre-flight requests -- if the page is in browser history and less than X seconds old not to issue a pre-flight. 

---
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/920#issuecomment-236449040

Received on Sunday, 31 July 2016 18:44:39 UTC