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

Interactions with the BFCache? #319

Closed
ArthurSonzogni opened this issue Aug 9, 2021 · 4 comments
Closed

Interactions with the BFCache? #319

ArthurSonzogni opened this issue Aug 9, 2021 · 4 comments
Labels
access handles Issues related to the new Access Handles proposal

Comments

@ArthurSonzogni
Copy link

You may want to reference this from the BFCache meta bug:
whatwg/html#5880
+CC @rakina

I was wondering what kind of interaction this feature will have with the Back-forward cache. I see the execution context can obtain a lock for a file. Then the document might be (?) able to enter the BackForwardCache without releasing it. Maybe this could cause some problems?
For instance there are other features like WebLock which prevents the BFCache from being used. Maybe the same should happen here:
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/back_forward_cache_impl.cc;l=265;drc=e5616aeff413a17175a96056b3bf1fbc9ca0ade7;bpv=1;bpt=1
Maybe you did it already. I see kWebFilesystem. Not sure if this is related.

More generally, you might want to clarify if there are any BFCache specific behavior about this feature.

@ArthurSonzogni ArthurSonzogni changed the title Interactions with the BFCAche? Interactions with the BFCache? Aug 9, 2021
@rakina
Copy link
Member

rakina commented Aug 11, 2021

On the kWebFilesystem thing, I think @hajimehoshi and @fergald did add WebFileSystem support for BFCache, but I'm not sure about the details - maybe the can comment on what Chrome is doing and if there's anything to be added on the spec side.

@fergald
Copy link

fergald commented Aug 11, 2021

My understanding is that WebFileSystem had nothing that prevented bfcaching (there are no connections to bring up/down or locks). I see that it's unblocking is still controlled by a flag but we should clean that up and leave it unconditionally unblocked.

I don't think there's any spec change (unless we want to state positively that it is compatible with bfcache) but we should probably add a WPT that checks if a page using WFS is cached. That would make it clear which browsers support it.

@mkruisselbrink
Copy link
Contributor

On the chrome side currently using the file system access API with local files on the file system will cause the page to be prevented from entering bfcache, although I think that is primarily since we haven't reased about interaction with usage tracking etc for our current permissions implementation (where lifetime of permissions is dependent on the presence of tabs with pages loaded).

For the newly proposed access handle API, which include file locking, I do suspect we'll need explicit spec-level integration with bfcache. We don't want pages in the bfcache to be able to keep files locked after all.

@mkruisselbrink mkruisselbrink added the access handles Issues related to the new Access Handles proposal label Aug 11, 2021
@a-sully
Copy link
Collaborator

a-sully commented Mar 9, 2022

This issue has been ported to the new spec: whatwg/fs#17

@a-sully a-sully closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
access handles Issues related to the new Access Handles proposal
Projects
None yet
Development

No branches or pull requests

5 participants