W3cubDocs

/HTTP

Feature-Policy: vr

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.

Syntax

Feature-Policy: vr <allowlist>;
<allowlist>

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

Default policy

The default allowlist is 'self'.

Specifications

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
vr
62-80
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.
79-80
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.
No
No
49-67
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.
No
No
62-80
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.
No
46-true
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.
No
8.0-true
WebVR API was never enabled by default in any production builds and was replaced by WebXR Device API.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy/vr