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

Support navigations where triggered resource loads bypass the cache #6718

Open
jgraham opened this issue May 25, 2021 · 4 comments
Open

Support navigations where triggered resource loads bypass the cache #6718

jgraham opened this issue May 25, 2021 · 4 comments

Comments

@jgraham
Copy link
Member

jgraham commented May 25, 2021

For WebDriver-BiDi we want a way to initiate a force reload (similar to shift-reload in some desktop browsers, or bypass cache in some devtools). This should cause fetches to happen in cache mode "reload" and bypass service-workers. Service worker itself seems to allow this possibility in a somewhat handwavy way (step 15.3 says "If request is a navigation request and the navigation triggering it was initiated with a shift+reload or equivalent, return null.").

In HTML the main problem is that subresource loads are mostly triggered implictly with each element containing a subresource having a list of conditions in which the load algorithm is triggered. This makes it hard to pass in parameters to the loading. Of course it's probably possible to replicate the same style (something like "if this algorithm was triggered by a navigation and the navigation params for that navigation has the force reload flag set, let request's cache mode be "reload"), but that doesn't seem very precise.

@annevk
Copy link
Member

annevk commented May 26, 2021

It seems to me that this is essentially a state of the client/environment/document that subresource fetches observe (and have access to) and adjust their policy on.

One thing I wondered about thinking through this is whether there's a lifetime aspect to this state or is the client/environment/document essentially considered reloaded in this manner forever, even if its days after the main load event fired.

cc @wanderview @jakearchibald

@jgraham
Copy link
Member Author

jgraham commented May 26, 2021

Yeah, so I'm not sure if this ends up affecting all resource loads, or only those that are directly initiated by the navigation. And I'd kind of assumed that each resource is reloaded once and after that normal cache behaviour resumes, but maybe that's not true either.

@jakearchibald
Copy link
Contributor

A quick test suggests that things fetched after window.onload will still go via the cache. I don't know where the 'cutoff point' is.

@domenic
Copy link
Member

domenic commented May 26, 2021

Related: #5222

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

No branches or pull requests

4 participants