Skip to Content
Platform Ontology

Permissions-Policy introspection and reporting

A page can list which browser features it is allowed to use, and a server can hear about violations.

Gets silentlyWhile you use it

document.permissionsPolicy.features() returns every feature the browser knows, and allowedFeatures() the ones this frame may use. Permissions-Policy-Report-Only lets a server learn what a page would break. Feature-Policy is the legacy name.

What it can and can't do

What the user does: None, the page reads it silently

It can

  • List all policy controlled features in Chromium
  • Tell which features a frame may use
  • Report violations to a server

It cannot

  • Change a policy from script
  • See other frames' policy

How it differs between platforms: Chromium implements it. Safari and Firefox are partial or absent. Report only and Document-Policy are low confidence.

Browser support

Version notes
  • Chrome: Introspection API and report only header
  • Edge: Same as Chrome
  • Firefox: Header support is partial per caniuse
  • Safari: Header support is partial per caniuse
  • Safari on iPhone: Same as Safari
  • Chrome on Android: Same as Chrome

How a site asks for it

APIdocument.permissionsPolicy.features(); document.permissionsPolicy.allowedFeatures(); allowsFeature(name); Permissions-Policy-Report-Only
Browser compat keysapi.PermissionsPolicy
http.headers.Permissions-Policy
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsPer origin
How to take it backClear site data
Inside an iframeSame as top level

Typical flow

  1. Page calls the API
  2. Browser answers with no prompt
  3. Page reads the result

Data you get

What comes back: A page can list which browser features it is allowed to use, and a server can hear about violations.
Shape: object
How often: on demand

FieldTypeUnitRangePrecision
features()listNoneevery policy controlled featureNot listed
allowedFeatures()listNonefeatures this frame may useNot listed
report onlyheaderNoneviolation reports to the serverNot listed

Technical limits

  • Chromium centered
  • Document-Policy and Feature-Policy details are low confidence
  • Report only is low confidence

The story

What it is

The page can read the rule list that decides which browser powers its frames may use.

For you

This is about what a page and the ads in it are allowed to do. You rarely see it.

For makers

Makers lock down embedded frames and check their own policy at run time.

Where you see it

TypeExampleApps
shoppingA shop blocks camera and microphone access for embedded ads.None named
newsA publisher checks which features its ad frames may use.None named

Risks

  • The feature list is itself a browser version signal

What the platform says

Good uses and abuse

Legitimate uses

  • Harden frames
  • Debug policy

Known abuse

  • Browser version fingerprinting

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits1Rough identifying entropy, when known

Sources

How well checked: Inferred from related behavior.

On this page