Gating powerful browser features
The Permissions-Policy header (formerly Feature-Policy) lets a site
declare which powerful browser features — geolocation, camera, microphone,
payment, fullscreen and many more — may be used, and in which origins and
frames. This reference lists the common features with their default allowlists
and explains the structured syntax and iframe delegation.
How it works
Each feature is assigned an allowlist of origins permitted to use it. In Permissions-Policy structured syntax the allowlist is wrapped in parentheses:
Permissions-Policy: geolocation=(self "https://maps.example.com"), camera=(), fullscreen=*
The tokens are * (any origin), self (the document’s own origin), an
explicit quoted origin list, or an empty list () to disable the feature
everywhere. A cross-origin <iframe> can request a feature with
allow="geolocation", but it is granted only if the parent’s policy already
permits that origin — the header sets the ceiling, the allow attribute
delegates beneath it.
Tips and notes
- Disable unused powerful features with
feature=()as a defence-in-depth step. selfis stricter than*: it excludes cross-origin frames unless explicitly delegated.- Combine the header with the iframe
allowattribute to scope features to specific embeds. - Permissions-Policy uses parentheses; the legacy Feature-Policy used space-separated origins without them.
- Browser support varies per feature — verify the specific feature in your target browsers.