This topic provides the basics for developing for Oculus Browser. Already have a great WebXR experience? Tell us about it for a chance to get featured in the Oculus Browser new tab page - a great way to get your experience discovered in VR.
The user-agent (UA) string for Oculus Browser is:
Mozilla/5.0 (Linux; Android 10; Quest 2) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/126.96.36.199.22.280317669 SamsungBrowser/4.0 Chrome/89.0.4389.90 VR Safari/537.36
The UA string should not be used for feature detection.
The UA string token for Oculus Quest devices is “Quest” and Oculus Quest 2 is “Quest 2”. Oculus Browser allows users to switch into mobile mode, in which case the “VR” token above becomes “Mobile VR”.
Note the Browser and Chromium version numbers may be newer than stated above.
For Oculus Quest 2, Oculus Browser renders both 2D web page content and WebXR at 90Hz refresh rate. On Quest, Oculus Browser uses 72hz refresh rate. When watching fullscreen media, Oculus Browser optimizes the device refresh rate based on the frame rate of the video.
For 2D web sites, users can resize the width of the content anywhere from 480px to 2240px, with a default width of 1320px. The height of the web page content is 599px.
Oculus Browser supports both mobile and desktop browsing modes, with desktop as the default. In mobile mode, the Mobile token appears in the UA string and the meta viewport tag is supported. In desktop mode, there is no Mobile token in the UA string and any meta viewport tags are ignored. Developers should test in both modes to ensure compatibility. WebXR content should be made available based on feature detection rather than UA string sniffing.
Oculus Browser supports using the Google Chrome (or other Chromium compatible browsers) developer tools to debug sites on your Oculus Quest device. This lets you access all of your familiar tools including the console, timeline, profiler, DOM viewer, etc. You’ll also be able to see a visual snapshot of what’s on screen in the headset right from your computer screen.
To get set up, you’ll need to enable Developer Mode on your headset and connect it to your computer using the Android Platform Tools. See Debugging Your Content for how to get set up. Once set up and connected, your tabs from Oculus Browser will appear in the Remote Devices panel of the dev tools. Click Inspect to start debugging a tab in Oculus Browser.