Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the value of navigator.platform on ARM Macs?

Apple has released several new computers based on M1 chip which uses ARM architecture (in contrast to previous computers that are based on x86 architecture). What is the value of the navigator.platform JavaScript variable in Safari, Chrome and other browsers on the new ARM computers? Also, what's the user agent (it should contain the platform name)?

You can check yours using this snippet:

console.log(navigator.platform);
console.log(navigator.userAgent);
like image 559
Finesse Avatar asked Nov 16 '20 06:11

Finesse


People also ask

Why is Navigator platform deprecated?

appVersion and navigator. platform are in process of being dropped from web standards. This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped.

What is Navigator platform?

The Navigator platform property is used for returning the platform for which the browser is compiled. It returns a string representing the platform of the browser. The possible values are: MacIntel. MacPPC.

What is navigator userAgent?

The Navigator userAgent property is used for returning the user-agent header's value sent to the server by the browser. It returns a string representing values such as the name, version, and platform of the browser.

How do you tell if your Mac is ARM based?

You can do this by typing “About This Mac” into Spotlight or by clicking the  logo in the top-left of the Menu Bar. A popup will appear, giving you some basic information on your Mac, such as the serial number and macOS version.


1 Answers

Tested on my real MacBook Air (M1) and the navigator.platform value for Chrome on ARM Macs is still MacIntel. I assume that will change in the future, this is just the first version of their M1 build.

Likewise, the user agent is also Intel: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36

If you want to detect if you're on an ARM M1 Mac, you can read the WebGL Renderer value which is Apple M1.

like image 93
Lonk Avatar answered Sep 23 '22 08:09

Lonk