Navigation Menu

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

Permissions-Policy: Unload #68

Open
fergald opened this issue Aug 30, 2022 · 2 comments
Open

Permissions-Policy: Unload #68

fergald opened this issue Aug 30, 2022 · 2 comments

Comments

@fergald
Copy link

fergald commented Aug 30, 2022

Introduction

We (chromium) would like to propose an unload permissions policy to help sites migrate away from use of unload handlers. TL;DR this header allows disabling firing the unload event on frames and subframes.

This was previously discussed in

The main motivation for this is that they are a large blocker of BFCache on desktop, they are a footgun (often don't fire on mobile) and in general there are better alternatives for (hopefully) all use cases.

We know that many sites are not in a position to use this header immediately, 3rd party iframes often use unload but this lets us make a start. We have reached out to some well-known iframe providers, asking them to remove their unloads. Once they do, they can guarantee remaining unload-free by shipping this header.Read the complete Explainer.

Feedback (Choose One)

Prior feedback is on w3c/webappsec-permissions-policy#444.

Please provide all feedback below.

@fergald fergald changed the title PROPOSAL NAME Permissions-Policy: Unload Aug 30, 2022
@steffenweber
Copy link

Our website (https://www.computerbase.de/) is bfcache-eligible on pages without ads (e.g. on the imprint page or when using our paid version "ComputerBase Pro") but is not when ads are served because "the page has an unload handler in a sub frame (UnloadHandlerExistsInSubFrame)". With an "Unload" permissions policy we could experiment with taking this feature away from ads though to be honest I'm not sure what breakage that would cause.

@astralmaster
Copy link

That would be a great feature. Web server administrators should have the option to disallow unload events, especially when they originate from 3rd-party iframes. Sometimes you need to use external widgets/modules but that should not penalize your performance or functionality.

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

No branches or pull requests

3 participants