Browser platform hints for a web developer demo
Check what a browser reveals about its platform, compare hints with device details, and learn how to present uncertain OS data accurately in a demo.
You are preparing a web demo and want to show which platform a visitor is using. The value may be missing, generic, or different from what you expect. That does not automatically mean the browser or device is broken.
Use TooLab's Browser Info to check browser details and supported features, then compare them with the device details available in System Info. This helps you explain what a platform hint can tell you, and what it cannot prove.
Check the browser's platform information
- Open Browser Info in the same browser and profile you plan to use for the demo. Review the browser version, engine, privacy information, and supported features.
- Open System Info in that browser. Note the device details it can report, such as processor, graphics, screen, battery, and network information.
- For a JavaScript demo, open your page and the browser's developer console. Evaluate
navigator.userAgentData?.platform. If it returns a value, treat it as a browser-reported platform hint, not a verified device identity. - Check whether the browser exposes the API at all by evaluating
navigator.userAgentData. If the result is undefined, the browser may not support this API or may not expose it in that context. - If your demo depends on a server request, inspect the request headers in the developer tools' Network panel. In browsers that support them, headers such as
Sec-CH-UA-Platformmay carry platform information. They are not guaranteed to appear in every browser or request.
Keep the comparison consistent. Use the same computer, browser, profile, and page context for each run. Private browsing, browser privacy protections, managed-device policies, and browser differences can change which information is available.
What the result means
A platform value appears
The browser is offering a platform label. It may be useful for a demo or for choosing a compatible presentation, but it is not proof of the exact operating system version, hardware model, or physical device. Browsers can reduce or generalize identifying information for privacy.
The API is undefined
Your page cannot use the User-Agent Client Hints JavaScript API in that browser context. This is a normal compatibility result, especially across different browser families. Do not treat a missing value as evidence that the visitor is using an unusual operating system.
The hint differs from the device details
The two sources report different kinds of information. A platform hint is browser-provided metadata, while System Info reports only the system details the browser can make available. Neither is a complete inventory, and a mismatch alone does not establish a fault.
The request header is missing
The browser may not support that client hint, may not send it for this request, or may be limiting what it shares. A page's JavaScript value and the headers received by a server are related but separate views. Check both if the demo is meant to explain network requests.
Make the demo handle platform hints safely
- Show an unavailable state. Check for
navigator.userAgentDatabefore reading its properties. If it is absent, show a neutral message such as “Platform information is not available in this browser.” - Use the hint as a label, not a gate. Do not block a feature or declare a device unsupported just because a platform string is unexpected. Detect the actual browser feature your page needs, then provide a fallback if it is missing.
- Keep the data request narrow. If you request additional client hints, ask only for information needed by the demo. High-entropy values, such as platform version or architecture, may require an explicit server request and can be withheld or reduced depending on browser support and policy.
- Test more than one browser. Try the browsers and devices your audience is likely to use. Record whether the API exists, whether it returns a value, and whether relevant request headers arrive. Do not assume a result in one browser applies everywhere.
- Label your output honestly. Use wording such as “Browser-reported platform” rather than “Your operating system is.” If you show a value from a request header, identify it as a client hint received by the server.
Why platform hints can be incomplete
Older sites often inspect the User-Agent string, a browser-provided text value that can include browser and platform clues. Modern browsers may reduce details in that string. User-Agent Client Hints offer structured information in some browsers, but they do not make platform detection exact or universal.
For a page-level check, navigator.userAgentData?.platform is a concise starting point in browsers that support the API. Some browsers expose a legacy property called navigator.platform, but it is not a dependable replacement for a full device check. Use feature detection to decide what your page can do, and use platform hints only when they help explain or tailor the experience.
For a developer demo, present the result as information the browser chose to share, not as a verified identity for the visitor's computer.
