nodejs.org
nodejs.org copied to clipboard
[nit] Select ARM64 by default in the dropdown if user is visiting from M1
Enter your suggestions in details:
Is your feature request related to a problem? Please describe.
Not a big issue, but I was browsing new redesigned website from M1 (on ARM architecture) and noticed that X64 was selected in the dropdown by default for prebuilt installer and binaries
https://nodejs-org-git-meta-remove-legacy-website-code-openjs.vercel.app/en/download
Prebuilt Installer
Prebuilt Binaries
Describe the solution you'd like
Select the architecture of visitors machine, if it's detectable from JavaScript.
For example, it's detectable from experimental await navigator.userAgentData.getHighEntropyValues(['architecture']) API call.
The website uses the experimental API to get bitness
https://github.com/nodejs/nodejs.org/blob/04fd007aa4528b88abcd0722c1c6ff1788cb08cc/util/getBitness.ts#L8-L10
Describe alternatives you've considered
N/A, as the user can explicitly select ARM
option from the dropdown even if X64
is selected by default.