WebXR immersive VR and AR sessions
Starts a full VR or AR session on a headset or phone.
In one line
Can start a full VR or AR session after you allow it
Starts a full VR or AR session on a headset or phone.
Streams head and controller pose every frame and, in AR, shows the camera view of the room. Reveals body movement, height and surroundings.
What it can and can't do
What the user does: You tap Enter VR or View in AR and allow the pop up.
It can
- Fill your view with a VR scene
- Show AR items placed in your room
- Track your head and device movement while the session runs
It cannot
- Start without you tapping and allowing
- See your surroundings in VR
- Keep running after you leave the session
- Work in Firefox, Safari or on iPhone
How it differs between platforms: Chrome and Edge support it. Safari and Firefox do not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 79 | 2019-12-10 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Not supported | Not available | Not listed | Firefox Desktop dropped support; Meta Quest browser has it |
| Safari | Not supported | Not available | Not listed | Safari on visionOS supports immersive-vr; not in BCD |
| Safari on iPhone | Not supported | Not available | Not listed | No WebXR on iPhone or iPad |
| Chrome on Android | Supported | 79 | 2019-12-17 | None |
| Samsung Internet | Supported | 12.0 | 2020-06-19 | None |
How a site asks for it
| API | navigator.xr.isSessionSupported(), requestSession('immersive-vr'|'immersive-ar'|'inline', {requiredFeatures, optionalFeatures}) |
| Permission name | xr-spatial-tracking |
| Permissions policy | xr-spatial-tracking |
| Browser compat keys | api.XRSystemapi.XRSessionapi.XRFrameapi.XRPose |
| How access is granted | prompt |
| What the user sees | Permission bubble for VR or AR tracking; AR may add camera consent |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per origin; prompt per session for AR on Chrome |
| How to take it back | Site settings, end session, headset system menu |
| Inside an iframe | Needs allow="xr-spatial-tracking" |
Typical flow
- Check isSessionSupported
- Click Enter VR
- requestSession() with features
- Frame loop via XRSession.requestAnimationFrame
Data you get
What comes back: 6DoF poses per frame
Shape: stream
How often: per display frame (72 to 120 Hz)
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
viewerPose.transform.position | object | meters | local space, unbounded | centimetre scale tracking |
viewerPose.transform.orientation | object | quaternion | unit quaternion | Not listed |
inputSources[].gripSpace / targetRaySpace | object | meters | per controller | Not listed |
boundsGeometry | list | meters | polygon of playable area | bounded-floor feature |
views[].projectionMatrix | list | None | 4x4 floats | Not listed |
Technical limits
- Needs HTTPS and a user gesture to start
- Immersive sessions pause when page loses focus
- Safari desktop and iOS have no WebXR; visionOS Safari supports immersive-vr
- Firefox dropped WebXR support
The story
What it is
A page can start a full VR or AR session on a headset or phone.
For you
You tap Enter VR or View in your room, and the page takes over your headset or your phone's screen. It asks first.
For makers
Makers can reach VR and AR users with just a link, with no app store. It is used for games, shopping, training and tours.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser VR game starts in a headset with one click. | Mozilla Hubs, Hyperfy |
| shopping | You see a sofa in your room through your phone before you buy. | IKEA, Wayfair |
| education | A web museum tour lets students stand inside an old city. | None named |
| travel | A hotel site gives you a VR walk through a room. | None named |
| enterprise | A web training session puts workers in a safe virtual factory. | None named |
| security | A bad VR page could cover your view and hide real world dangers. | None named |
Risks
- Disorientation
- Blocks your view
What the platform says
- W3C: WebXR Device API. The Immersive Web group pitches WebXR as a way to bring virtual and augmented reality to the web.
Good uses and abuse
Legitimate uses
- VR games
- Product visualisation
- Training
Known abuse
- Body and room scanning
- Movement as biometrics
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 4 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2019-12, Chrome 79: WebXR Device API ships
- 2020-02, Chrome 81: Hit test
- 2021-08, Chrome 90: Depth sensing and light estimation
- 2024-12, Chrome 131: Hand tracking
- 2026-09, Safari 27: Texture array projection layers on visionOS Safari
Related capabilities
Related
- WebXR hand tracking. Can see where each of your fingers is inside a headset session
- WebXR world sensing (hit test, anchors, depth, planes, camera). Can detect surfaces and depth in your room, and even see camera frames
Sources
How well checked: Checked against real behavior.