Create a Permissions-Policy response header for geolocation, camera, microphone, fullscreen, and payment with FreeProKit. The header lets a website declare which origins may use selected browser features, helping reduce unnecessary capability access in top-level pages and embedded content. Use the generator to build the header, then review every feature before deploying it through your server, framework, hosting platform, or CDN. Browser support varies by directive, so test the final policy in the browsers your site supports.
What Is a Permissions-Policy Header?
The `Permissions-Policy` HTTP response header controls whether selected browser features can be used in a document and in embedded content such as iframes. Each rule combines a feature directive with an allowlist that defines where that feature is permitted.
FreeProKit currently focuses the generator on five features: geolocation, camera, microphone, fullscreen, and payment.
How to Generate a Permissions-Policy Header
- Open the Permissions-Policy Header Generator.
- Review the controls shown for geolocation, camera, microphone, fullscreen, and payment.
- Choose the policy behavior that matches how your website actually uses each feature.
- Run the generator and review the resulting Permissions-Policy header.
- Check that no required feature has been blocked for your own pages or trusted embeds.
- Copy the generated header into your web server, application framework, hosting platform, or CDN configuration and test the deployed response in supported browsers.
Understand the Allowlist Syntax
Current Permissions-Policy syntax uses a feature directive followed by an allowlist. Multiple directives are separated by commas.
Permissions-Policy: geolocation=(), camera=(), microphone=(), fullscreen=(self), payment=()
This example blocks geolocation, camera, microphone, and payment while allowing fullscreen for the same origin. Use it only as a syntax example; your real policy should match your site.
- `()` disables the feature.
- `*` allows the feature broadly.
- `(self)` allows the same origin.
- `(self “https://example.com”)` allows the current origin plus an explicitly listed origin.
Control Geolocation
Use the geolocation directive to control whether the Geolocation API may be used in contexts governed by the policy. If the site never needs location access, disabling it can reduce unnecessary feature exposure.
Control Camera and Microphone Access
The camera and microphone directives control access to media-input capabilities. Sites that do not provide recording, calls, voice input, scanning, or similar features can consider restricting them. If a trusted embedded service needs these capabilities, test the top-level header and iframe configuration together.
Control Fullscreen
The fullscreen directive controls whether the Fullscreen API can be used. Video players, presentation tools, dashboards, and app-like experiences may need it, so do not block fullscreen without testing required user flows.
Control Payment Features
The payment directive controls use of the Payment Request API. Browser support for Permissions Policy and individual directives varies, so check current compatibility before relying on the header as the only control.
Permissions Policy Is Not the User Permission Prompt
Permissions Policy and the Permissions API are related but different. The server policy decides whether a feature can be used in the document. Browser permission APIs handle the user-granted state for supported features. A policy does not grant permission; it can only make access more restrictive.
Permissions-Policy and iframes
Embedded content can be governed by both the parent page’s `Permissions-Policy` header and the iframe `allow` attribute. A child frame cannot re-enable a feature that its parent has already disabled. This matters for maps, video, conferencing, payments, and other third-party embeds.
Feature-Policy vs. Permissions-Policy
Permissions Policy was previously called Feature Policy, and the HTTP header syntax changed. Older tutorials may contain outdated `Feature-Policy` examples, so use current `Permissions-Policy` syntax when configuring a modern site.
Check Browser Compatibility Before Deployment
Current MDN documentation marks the Permissions-Policy header as limited availability and experimental. Support differs by browser and directive. Test every feature your site needs across the browsers and devices you support.
Deploy and Verify the Header
The generated value must be sent as an HTTP response header by your server, application framework, reverse proxy, host, or CDN. After deployment, inspect the page response in browser developer tools and confirm that the final header is present and has not been overwritten.
You can paste raw request or response headers into the HTTP Headers Parser to view them as a readable table and JSON representation.
Use Other Policy Headers for Different Jobs
Permissions-Policy is only one part of a website response-header strategy. Other headers solve different problems.
Use the Referrer-Policy Header Generator to control referrer information. Analyze CSP with the Content Security Policy Analyzer, or generate a script nonce with the CSP Nonce Generator.
Privacy and Browser Processing
FreeProKit states that uploaded files are processed in the browser unless a tool clearly identifies a live server check. The Permissions-Policy Header Generator is presented as a JavaScript browser tool and does not need to contact your website merely to generate a header value.
Important Limitations
- The live page verifies five generator features: geolocation, camera, microphone, fullscreen, and payment.
- The exact workspace controls and origin-entry options are not exposed in the public crawl.
- Browser support varies by directive and browser version.
- The generated header must still be deployed by you.
- A restrictive header can break legitimate first-party or embedded functionality.
- Permissions Policy does not replace CSP, Referrer-Policy, authentication, authorization, secure-context requirements, or user permission handling.
- Default allowlists differ by directive, so omitting a feature is not identical to explicitly disabling it.
Frequently Asked Questions
What does FreeProKit’s Permissions-Policy Header Generator create?
The live page says it creates a Permissions-Policy header for geolocation, camera, microphone, fullscreen, and payment. The public crawl does not expose every workspace option, so review the generated value and the controls shown in the live tool before deployment.
What does `geolocation=()` mean in Permissions-Policy?
An empty allowlist disables the geolocation feature in the contexts governed by that policy. The same empty-allowlist pattern can be used with other directives. Always confirm that no required first-party or embedded functionality depends on the feature before blocking it.
What is the difference between `*`, `(self)`, and `()`?
`*` broadly allows the feature, `(self)` allows the current origin, and `()` disables the feature. Explicit origin allowlists can also be used. The least-permissive setting that still supports required functionality is usually easier to reason about than broad access.
Is Permissions-Policy the same as the browser Permissions API?
No. Permissions Policy is a document-level policy set by the server or iframe configuration. The Permissions API lets JavaScript query user-permission state for supported features. A policy can block a feature before a normal user permission prompt would be useful.
Can Permissions-Policy control features inside iframes?
Yes, but iframe behavior is affected by both the parent document policy and the iframe `allow` attribute. A child frame cannot re-enable a feature that the parent policy has already disabled. Test third-party embeds whenever you tighten the header.
Is Permissions-Policy supported in every browser?
No. Current MDN documentation marks the header as limited availability and experimental, and support differs by directive. Check current browser-compatibility data for the features your site uses before treating the header as a universal control.
Is Feature-Policy the same header?
Feature Policy was the earlier name and used older HTTP-header syntax. Permissions Policy superseded it. Older tutorials can therefore contain outdated examples, so use current `Permissions-Policy` syntax when configuring a modern site.
How do I test the generated Permissions-Policy header?
Deploy it as an HTTP response header, inspect the page response in browser developer tools, and test every feature and trusted embed that should still work. You can also paste raw response headers into FreeProKit’s HTTP Headers Parser for a clearer structured view.
