Finesse
Finesse

Reputation: 10821

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);

Upvotes: 17

Views: 8837

Answers (5)

Bombe
Bombe

Reputation: 83943

Firefox 108 on an M1 (with macOS Big Sur, 11.7.2) also still reports MacIntel.

Upvotes: 1

Niek
Niek

Reputation: 2096

All Chrome / Chromium-based browsers will return MacIntel on macOS, no matter what the hardware architecture is. See the source code here: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6

Upvotes: 8

Lukas Liesis
Lukas Liesis

Reputation: 26423

navigator.userAgent:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36

It's up to date MacBook Air with M1 8GPU model. I downloaded M1 version of Chrome from official site.

enter image description here

enter image description here

Upvotes: 0

maxfloden
maxfloden

Reputation: 325

Tested on my M1 and interestingly enough, Safari on an M1 also returns MacIntel for navigator.platform.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15

Upvotes: 2

Lonkelle
Lonkelle

Reputation: 83

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.

Upvotes: 5

Related Questions