fer...@chromium.com, bfcache-dev
https://github.com/fergald/docs/blob/master/explainers/permissions-policy-unload.md
https://github.com/whatwg/html/pull/7915
This feature allows pages to disable the running of unload event handlers. The goal is to :
- allow sites that have removed all unload handlers to ensure they do not accidentally add new ones
- allow sites to remove unload handlers when updating the code would is infeasible
Unload event handlers are problematic for various reasons and prevent use of BFCache on Desktop (see https://web.dev/bfcache/#never-use-the-unload-event).
Help sites migrate off unload event handlers and thereby improve BFCache hit-rate:
- by ensuring that once removed, handlers do not creep back in
- by providing a means to disable handlers in 3rd party iframes and script that is hard to change
https://github.com/w3c/webappsec-permissions-policy/issues/444
https://github.com/w3ctag/design-reviews/issues/738
Pending
3rd-party frames that rely on unload may not work as expected when navigating away. This is solvable by the frame authors by use of alternatives to unload and is unlikely to impact users. See detailed discussion.
Gecko: Negative (https://github.com/w3c/webappsec-permissions-policy/issues/444#issuecomment-1047829132) FF objects to this (similar to sync-xhr and document-domain) because it’s providing a way to cause cross-origin interference with script. Explainer addresses this.
WebKit: No signal
Web developers: Positive
Private discussions with devs are positive. Sites that have made efforts to remove all unload handlers want to use this to prevent accidental returns. Also some providers of 3rd-party iframes which have content outside of their control (e.g. ad network) want to guarantee themselves to be unload-free.
Other signals:
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
N/A
No
False
No milestones specified
https://chromestatus.com/feature/5760325231050752
This intent message was generated by Chrome Platform Status.