COOP same-origin blocks BFCache
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
People
(Reporter: alex_y_xu, Unassigned)
References
(Depends on 1 open bug)
Details
Steps to reproduce:
- Add the following content to a page:
<script>
window.addEventListener('pageshow', function (event) {
console.log("page showed", event.persisted);
});
window.addEventListener('pagehide', function (event) {
console.log("page hidden", event.persisted);
});
</script>
<a href="/">same-origin link</a>
<a href="https://example.com">cross-origin link</a>
- Serve the page with and without Cross-Origin-Opener-Policy: same-origin.
- Navigate to the page, then click one link, then the back button, then the other, then back.
Expected behavior:
All back navigations are successfully loaded from BFCache.
Actual behavior:
Back navigations except cross-origin with Cross-Origin-Opener-Policy: same-origin set are loaded from BFCache. "D/PageCache no saved presentation for uri" is logged in that case, implying that COOP same-origin causes the page to be totally unloaded.
Additional information:
I believe this is a bug, because navigating using an ordinary <a> tag (i.e. without target attribute) does not set opener in the resulting Window. Therefore, there should be no difference whether Cross-Origin-Opener-Policy is or is not set.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Navigation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
For cross-origin one we need Fission+bfcache.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Olli, can you confirm that this works correctly with Fission and BFCache enabled?
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Using https://first-party-test.glitch.me/coop as a testcase, bfcache in fission seems to fix this.
Description
•