Permissions-Policy: execution-while-not-rendered

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The HTTP Permissions-Policy header execution-while-not-rendered directive controls whether tasks should execute in frames while they're not being rendered (e.g. if an iframe is hidden or has display: none set).

Specifically, where a defined policy blocks execution of task rendering while content is not being rendered, while that condition is true, that content will be put in the frozen state as defined in the Page Lifecycle API. This stops execution of freezable tasks such as JavaScript timers (e.g. setTimeout()) and fetch() callbacks.

Syntax

http

Permissions-Policy: execution-while-not-rendered=<allowlist>;
<allowlist>

A list of origins for which permission is granted to use the feature. See Permissions-Policy > Syntax for more details.

Default policy

The default allowlist for execution-while-not-rendered is *.

Specifications

Specification
Page Lifecycle
# feature-policies

Browser compatibility

BCD tables only load in the browser

See also