Feature-Policy: vr

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

Warning: The WebVR API has been replaced with the WebXR Device API and is currently being removed from the web platform. Use the feature identifier xr-spatial-tracking for WebXR Device API instead.

The HTTP Feature-Policy header vr directive controls whether the current document is allowed to use the WebVR API. When this policy is enabled, the Promise returned by Navigator.getVRDisplays() will reject with a DOMException.


Feature-Policy: vr <allowlist>;

A list of origins for which the feature is allowed. See Feature-Policy.

Default policy

The default allowlist is 'self'.


Specification Status Comment
Permissions Policy Editor's Draft Initial definition.
WebVR 1.1 Draft

Browser compatibility

BCD tables only load in the browser

See also