-
Notifications
You must be signed in to change notification settings - Fork 313
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
consider how Client API should behave with bfcache #1038
Comments
|
Do we have bf cache spec'd in HTML? If so, we might want to match service worker registration again from there when a client is restored. |
|
To clarify last comment, if |
Same goes if the client's controller would change. Eg a service worker upgrade would cause older bf clients to evict, a |
On Chrome, we do not have a bfcache. With a Service Worker involved, we think it would be best to allow the developers to identify which user journey is playing out and decide for themselves if they want to fallback to the default behavior or use a custom behavior on a per resource request basis. I'm currently trying to piece out a solution from the current SW/Fetch specs. Side-note: if this use case is reasonable and can (has to) be done in Chrome, then should developers be able to override bfcache and control the user experience via their service worker with other UAs? |
For TPAC:
|
Notes:
|
Hey, Check out this article by web.dev from here |
In Firefox we have a back-forward cache (bfcache). When in effect you get
pageshow
andpagehide
events with theevent.persisted
attribute set to true. I believe safari has this mechanism as well.How should we handle the
Client
for windows that go into and out of the bfcache?My current plan is:
Clients.matchAll()
.postMessage()
while the environment is in the bfcache will be queued and delivered if the page comes out of bfcache.The
postMessage()
thing might be too expensive memory-wise, but I'd like to try it.The text was updated successfully, but these errors were encountered: