chromium/components/policy/resources/templates/policy_definitions/Miscellaneous/ForcePermissionPolicyUnloadDefaultEnabled.yaml

caption: "Controls whether <ph name=\"UNLOAD_EVENT_NAME\">unload</ph> event \
handlers can be disabled."
default: false
desc: "<ph name=\"UNLOAD_EVENT_NAME\">unload</ph> event handlers are being \
deprecated. Whether they fire depends on the <ph name=\"UNLOAD_EVENT_NAME\"> \
unload</ph> <ph name=\"PERMISSIONS_POLICY_NAME\">Permissions-Policy</ph>. \
Currently, they are allowed by policy by default. In the future they will \
gradually move to being disallowed by default and sites must explicitly enable \
them using <ph name=\"PERMISSIONS_POLICY_NAME\">Permissions-Policy</ph> \
headers. This enterprise policy can be used to opt out of this gradual \
deprecation by forcing the default to remain as enabled.\n\ \
\n\
Pages may depend on <ph name=\"UNLOAD_EVENT_NAME\">unload</ph> event
handlers to save data or signal the end of a user session to the server. This
is not recommended as it is unreliable and impacts performance by blocking
use of <ph name=\"PRODUCT_NAME\">BackForwardCache</ph>. Recommended
alternatives exist, however the <ph name=\"UNLOAD_EVENT_NAME\">unload</ph>
event has been used for a long time. Some applications may still rely on
them.\n\
\n\
If this policy is set to false or not set, then
<ph name=\"UNLOAD_EVENT_NAME\">unload</ph> events handlers will be gradually
deprecated in-line with the deprecation rollout and sites which do not
set <ph name=\"PERMISSIONS_POLICY_NAME\">Permissions-Policy</ph> header will
stop firing `unload` events.\n\
\n\
If this policy is set to true then <ph name=\"UNLOAD_EVENT_NAME\">unload</ph> \
event handlers will continue to work by default.\n\
\n\
NOTE: This policy had an incorrectly documented default of `true` in M117. \
The unload event did and will not change in M117, so this policy has no effect \
in that version.\n"
example_value: true
features:
  dynamic_refresh: true
  per_profile: false
items:
- caption: "Force unload event handlers to remain enabled by default during \
deprecation"
  value: true
- caption: "Allow unload event handlers to be disabled by default during \
deprecation"
  value: false
owners:
- [email protected]
- [email protected]
schema:
  type: boolean
supported_on:
- android:117-
- chrome.*:117-
- chrome_os:117-
- fuchsia:117-
tags: []
type: main