← Back to release summary

Permissions-Policy: unload

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 115)
Intent stage
Prepare to ship

Summary

This feature allows pages to disable the running of unload event handlers. The goals are: - allow sites that have removed all unload handlers to not regress (i.e. accidentally adding new ones) - allow sites to “remove” (skip) unload handlers (e.g. if updating the code is infeasible, or if they have nondeterministic chains of third parties and would rather not risk the BFCache benefits over unload handlers in third party code). 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). This is the first step to deprecating and removing unload handlers.

Motivation

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

Standards & signals

Docs: https://github.com/fergald/docs/blob/master/explainers/permissions-policy-unload.md

Explainers: https://github.com/fergald/docs/blob/master/explainers/permissions-policy-unload.md

View on chromestatus.com