Getting Started

The basics of developing for Oculus Browser.

User-Agent String

The user-agent (UA) string for Oculus Browser is:

Mozilla/5.0 (Linux; Android 7.1.1; Quest Build/NGI77B)
AppleWebKit/537.36 (KHTML, like Gecko)
OculusBrowser/5.7.1.23.151668513
SamsungBrowser/4.0
Chrome/66.0.3359.203
Mobile VR
Safari/537.36

The UA string should not be used for feature detection.

The UA string has a different token on different devices:

  • Oculus Quest: Quest Build
  • Oculus Go: Pacific Build
  • Gear VR: SAMSUNG SM-G920F for a Samsung Galaxy S6, for example.

Display Name and Refresh Rate for Oculus Go

The WebVR VRDisplay.displayName property for Oculus Go is Oculus Go. For Oculus Quest, it is Oculus Quest.

For Oculus Go and Quest, Oculus Browser renders 2D web page content at 72Hz refresh rate by default, and WebVR content at 60Hz refresh rate by default.

Browser Window Size

For 2D web sites, users have the choice between 3 different widths of the Oculus Browser panel: 800px, 600px, and 400px. The height of the browser panel is 450px. Future versions of Oculus Browser may allow for more sizes, so be sure to support responsive design. The browser typically behaves as a mobile browser with a mobile UA string and support for meta viewport configuration.

Debugging Your Experiences

Oculus Browser supports using the Google Chrome developer tools to debug sites on your Oculus Go, Quest, or Samsung Gear VR 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 snapshot of what’s on screen in the headset right from your computer screen.

If you have not set up your device or have never connected your Oculus Go or Android phone to your development machine, see Debugging Your Content. Once set up, you can find the Oculus Browser tabs to inspect by using the dev tools Remote Devices panel while the developer mode enabled headset is connected.

Alternatively, most WebGL experiences can be debugged before you ever launch the Oculus Browser with just a little extra code. Here are some quick tips to debugging your experience locally before you enter VR:

  • Know how to set up your camera to match that of your device. This means figuring out a common eye buffer size and field of view. We recommend using a 90 degree field of view and a buffer size of 1024 by 1024 (a single eye).
  • You only need to render one eye, but have an adjustment so you can pick which eye to render. This can allow you to swap between the left and right eye and look for bugs. Alternatively render both eyes.
  • Use mouse events and the Device Orientation API to mimic head orientation so you can change your view dynamically when not in a headset.

What’s Next?

To get started building, see our Introduction to the Web VR API. Or, take a look at React 360, an open source JavaScript framework that makes it easy to get started building immersive web sites.

Already have a cool WebVR 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.