Open In App

HTTP headers | Feature-Policy

The HTTP Feature-Policy is response-type headers. Most of our web browser are empowered nowadays to use some features and API’s to provide additional experiences for web users. Feature-Policy is an HTTP header that can allow website owners to toggle on or off certain of those web browser features and API. This effect is caused to both the host website and on the pages which are embedded in it. To use this HTTP header, we can edit the .htaccess file or server config file. It is an important point to note that, this header is not concerned with a website’s security but with delivering a good and smooth experience for website users. 

Syntax:



Feature-Policy:  <directive> <allow-list>

Directive: This header accepts 2 directive but on directive can redirect with other directives, as mentioned and described below:

<directive>: This directive can redirect to any of the following directive:



Examples 

Feature-Policy: microphone 'self'; camera 'self'
Feature-Policy: geolocation 'self'

Supported Browsers: The browsers supported by HTTP header Feature-Policy are listed below:

Article Tags :