navigator.platform

« DOM Reference

Summary

Returns a string representing the platform of the browser.

Syntax

platform = navigator.platform 

platform is a string with one of the following values: "Win32", "Linux i686", "MacPPC", "MacIntel", or other.

Example

alert(navigator.platform);

Notes

Unless your code is privileged (chrome or at least has the UniversalBrowserRead privilege), it may get the value of the general.platform.override preference instead of the true platform.

Specification

This was originally part of DOM Level 0, but has been since included in the HTML5 spec.

Document Tags and Contributors

 Last updated by: Dria,