I know that this changes quite often, but is there a list as exhaustive as possible out there of the possible values returned by navigator.platform
?
List so far:
platform. Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes.
Property of JavaScript navigator objectreturns the language. It is supported in Netscape and Firefox only. returns the user language. It is supported in IE only.
The Navigator object has properties that convey the browser's information. For example, the userAgent is a property of the window. navigator object. It is a long string that identifies the web browser.
The navigator property of a window (i.e. window. navigator ) is a reference to a Navigator object; it is a read-only property which contains information about the user's browser. Since Window is a global object and it is at the top of the scope chain, so properties of the Window object such as window.
Disclaimer: please note this property is sent by the browser and can thus be faked, just like user agent strings. Never rely on the navigator
object to be completely accurate.
navigator.platform
indicates the machine type for which the browser was compiled.
This basically means the property can return Win16
when the user is running a browser compiled for 16-bit, even though the user is on a 32-bit or 64-bit Windows machine.
Of course W3Schools lists the old definition (I'm not even gonna link to them). W3 and MDN have agreed on a different definition though:
navigator.platform
represents the platform on which the browser is executing.
Still, this definition is a bit vague. A decade ago a 'platform' would either be a CPU architecture or an operating system. In recent years handheld and media devices can be platforms too.
It seems like we're a bit luckier when it comes to handheld and media devices. As you've already stated in your question, the iPhone, iPod and iPad each got a unique value, even though they're all running the same operating system. All of Nintendo's and Sony's devices are returning unique values too. So only now navigator.platform
is starting to look interesting.
But then Opera Mini for iPhone comes along, messing things up again. Opera Mini actually returns a code engine version number, which is a completely different interpretation of platform
than anything we've come across so far. So now we're back where we started and we start to understand why there's so little information on this subject out there.
Even though the interpretations vary and I don't have a complete answer for you, I did feel like I should add my 2 cents for anyone else out there researching the navigator.platform
property.
Android
It's really hard to test for Android devices. Android devices will return Android
just as often as some version of Linux. For example on a Nexus 5 phone, both the Android browser and Chrome return Linux armv7l
. In rare cases Android devices can even return null
(instead of undefined
).
Android
(2008)Linux
: see notes abovenull
Apple
As far as iOS goes: Safari, Chrome and Mercury agree, but Opera messes things up.
iPhone
(2007)iPod
(2007)iPad
(2010)iPhone Simulator
: simulator shipped with XcodeiPod Simulator
: simulator shipped with XcodeiPad Simulator
: simulator shipped with XcodeMacintosh
MacIntel
: Intel processor (2005)MacPPC
: PowerPC processorMac68K
: 68000 processorPike v7.6 release 92
: Opera Mini 5 on any iPhone (2009)Pike v7.8 release 517
: Opera Mini 7 on any iPhone (2012)BlackBerry
BlackBerry
(2003)FreeBSD
FreeBSD
FreeBSD i386
: x86 (IA-32) processorFreeBSD amd64
: AMD x86-64 processorLinux
Seriously unreliable because so many platforms are built on this. For example, Chrome on ChromeOS or Linux x86-64 both return Linux i686
as that's what they were compiled for.
Note Linux ARM lists architecture flags, e.g. armv5tej
would denote a v5 ARM architecture with Thumb support ('T'), a DSP instruction set ('E'), and Jazelle support ('J').
Linux
Linux aarch64
Linux armv5tejl
Linux armv6l
Linux armv7l
Linux armv8l
Linux i686
Linux i686 on x86_64
Linux i686 X11
: based on X11 Window SystemLinux MSM8960_v3.2.1.1_N_R069_Rev:18
: Sony Xperia VLinux ppc64
Linux x86_64
Linux x86_64 X11
: based on X11 Window SystemMicrosoft
Even on a 64-bit Windows 8 they all stick to Win32
.
OS/2
(1994†)Pocket PC
Windows
Win16
: Windows 3.1x (1992†)Win32
: Windows 95 and upWinCE
Mozilla (Firefox OS)
An empty string is returned in the web browser on Firefox OS. See this bug report.
KaiOS
The web browser on KaiOS (based on Firefox) also returns the empty string (same as Firefox OS). See this bug report.
Nintendo
New Nintendo 3DS
(2014)Nintendo DSi
(2008)Nintendo 3DS
(2011)Nintendo Wii
(2006)Nintendo WiiU
(2012)OpenBSD
OpenBSD amd64
Symbian / S40
Nokia_Series_40
(1999†)S60
(2002†)Symbian
: Opera on SymbianSymbian OS
Palm
PalmOS
(1996)webOS
(2009)Solaris
SunOS
SunOS i86pc
SunOS sun4u
: SPARC processorSony
PLAYSTATION 3
(2006)PlayStation 4
(2013)PSP
: PlayStation Portable (2004)Various
HP-UX
: Hewlett-Packard UniXmasking-agent
: value changes to this when using Masking Agent for FirefoxWebTV OS
X11
: X11 Window SystemHave a device that's not on this list? Please leave a comment listing your device's properties and its navigator.platform
value (feel free to use this JSFiddle to find the value).
Hope this helps.
I can add to this list with definitive values for specific devices I've tested.
Where the string is Linux armv7l
, it ends in a lowercase L
(for "Linux, presumably?), rather than being a number 1
or lowercase I
.
For the iOS devices, testing was performed in Safari. For the Android devices, testing was performed in the stock browser, or Chrome if no stock browser was installed.
Of the Windows tablet devices, the Nokia Lumia was running Windows RT 8.1 with IE 11.0.9600.16476, and the MS Surface was running Windows 8.1 Pro with IE 11.0.9600.16438.
Of the Windows phones devices, the Nokia Lumia was running Windows Phone 8.1 and IE 11.
Phones
Device OS window.navigator.platform --------------------------------------------------------------------------- iPhone 4 iOS 7.1 iPhone iPhone 5 iOS 7.1.1 iPhone iPhone 5c iOS 7.1 iPhone iPhone 5s iOS 7.1 iPhone Samsung Galaxy S2 Android 4.1.2 Linux armv7l Samsung Galaxy S3 Mini Android 4.1.2 Linux armv7l Samsung Galaxy S3 Android 4.3 Linux armv7l Samsung Galaxy S4 Android 4.4.2 Linux armv7l Samsung Galaxy Note 3 Android 4.4.2 Linux armv7l Samsung Galaxy S6 Android 5 Linux aarch64 Nexus 4 Android 4.4.2 Linux armv7l Nexus 5 Android 4.4.2 Linux armv7l HTC One Android 4.4.2 Linux armv7l Sony Xperia Z Android 4.2.2 Linux armv7l Motorola Moto G Android 4.4.2 Linux armv7l Nokia Lumia 1520 Windows 8.1 Win32
Tablets
Device OS window.navigator.platform --------------------------------------------------------------------------- iPad 2nd generation iOS 6.1.3 iPad iPad 2nd generation iOS 7.0.3 iPad iPad 4th generation iOS 6.1.2 iPad iPad 4th generation iOS 6.1.3 iPad iPad mini (non retina) iOS 6.1.3 iPad iPad mini (retina) iOS 7.0.3 iPad Samsung Galaxy Tab 2 7" Android 4.0.3 Linux armv7l Samsung Galaxy Tab 3 7" Android 4.1.2 Linux armv7l Samsung Galaxy Tab 3 Android 4.2.2 Linux i686 Samsung Galaxy Note 10.1 (2012) Android 4.1.2 Linux armv7l Samsung Galaxy Note 10.1 (2014) Android 4.3 Linux armv7l Nexus 7 (2012) 7" Android 4.4.3 Linux armv7l Nexus 7 (2013) 7" Android 4.3 Linux armv7l Nexus 10 Android 4.4.2 Linux armv7l Lenovo Yoga Android 4.2.2 Linux armv7l Sony Xperia Z Android 4.3 Linux armv7l Tesco Hudl 7" Android 4.2.2 Linux armv7l Kindle Fire 7" (2012) Unknown Linux armv7l Kindle Fire HDX 7" (2013) Unknown Linux armv7l Asus Transformer Pad TF300T Android 4.0.3 Linux armv7l Nokia Lumia 2520 Windows RT 8.1 Win32 MS Surface Tablet Pro Windows 8.1 Pro Win64 Desktop PC (HP) Windows 7 Ent. Win32 Desktop PC (iMac) OSX 10.8.5 MacIntel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With