Bug 1556223 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I propose that Win64 and WOW64 Firefox use the unadorned Windows User-Agent already used by Firefox on x86 and AArch64 Windows. The primary use case for including CPU architecture and OS version in the User-Agent string is to allow software download sites to offer compatible software. If a site doesn't see "Win64" or "WOW64" in the User-Agent string, it might serve a Win32 x86 executable to a Win64 OS user. The x86 executable would still be compatible, just not optimal.

Linux users are unlikely to download much software from sites that sniff their CPU architecture, so omitting it should be safe (or if a CPU architecture token is needed for User-Agent parsing webcompat, we could spoof "i686" or simply "CPU" like iOS Safari).

I propose no change to the macOS User-Agent string at this time. Removing "Intel" now would not reduce any fingerprinting entropy (all modern Macs are x86_64) and might risk confusing some User-Agent string parsers. If AArch64 MacBooks become a thing, I propose we then omit CPU architecture on both x86_64 and AArch64 macOS.

The patches in this bug remove the CPU architecture from:

* Windows' and Unix's User-Agent HTTP header
* Windows', Unix's, and Android's `navigator.userAgent`, `navigator.oscpu`, and `navigator.platform` Web APIs

I have other patches with more incremental changes, such as changing the User-Agent header but not the navigator APIs, but they introduce new code complications. I'd like to propose these patches with the ideal outcome and only fall back to an incremental change if needed for webcompat.

## Before:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|AArch64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86 on x86_64|... Windows NT 10.0; WOW64; ...|"Windows NT 10.0; WOW64"|"Win32"
Windows|x86_64|"... Windows NT 10.0; Win64; x64; ..."|"Windows NT 10.0; Win64; x64"|"Win32"
Linux|x86|"... Linux i686; ..."|"Linux i686"|"Linux i686"
Linux|x86 on x86_64|"... Linux i686 on x86_64; ..."|"Linux i686 on x86_64"|"Linux i686 on x86_64"
Linux|x86_64|"... Linux x86_64; ..."|"Linux x86_64"|"Linux x86_64"
Android|ARMv7|"... Android 8.1.0; ..."|"Linux armv7l"|"Linux armv7l"
Android|AArch64|"... Android 8.1.0; ..."|"Linux aarch64|"Linux aarch64"
macOS|x86_64|"... Macintosh; Intel Mac OS X 10.14; ..."|"Intel Mac OS X 10.14"|"MacIntel"

## Changed:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|x86 on x86_64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86_64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Linux|x86|"... Linux; ..."|"Linux"|"Linux"
Linux|x86 on x86_64|"... Linux; ..."|"Linux"|"Linux"
Linux|x86_64|"... Linux; ..."|"Linux"|"Linux"
Android|ARMv7|"... Android 8.1.0; ..."|"Linux"|"Linux"
Android|AArch64|"... Android 8.1.0; ..."|"Linux"|"Linux"

## Unchanged:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|AArch64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
macOS|x86_64|"... Macintosh; Intel Mac OS X 10.14; ..."|"Intel Mac OS X 10.14"|"MacIntel"
I propose that Win64 and WOW64 Firefox use the unadorned Windows User-Agent already used by Firefox on x86 and AArch64 Windows. The primary use case for including CPU architecture and OS version in the User-Agent string is to allow software download sites to offer compatible software. If a site doesn't see "Win64" or "WOW64" in the User-Agent string, it might serve a Win32 x86 executable to a Win64 OS user. The x86 executable would still be compatible, just not optimal.

Linux users are unlikely to download much software from sites that sniff their CPU architecture, so omitting it should be safe (or if a CPU architecture token is needed for User-Agent parsing webcompat, we could spoof "i686" or simply "CPU" like iOS Safari).

I propose no change to the macOS User-Agent string at this time. Removing "Intel" now would not reduce any fingerprinting entropy (all modern Macs are x86_64) and might risk confusing some User-Agent string parsers. If AArch64 MacBooks become a thing, I propose we then omit CPU architecture on both x86_64 and AArch64 macOS.

The patches in this bug remove the CPU architecture from:

* Windows' and Unix's User-Agent HTTP header
* Windows', Unix's, and Android's `navigator.userAgent`, `navigator.oscpu`, and `navigator.platform` Web APIs

I have other patches with more incremental changes, such as changing the User-Agent header but not the navigator APIs, but they introduce new code complications. I'd like to propose these patches with the ideal outcome and only fall back to an incremental change if needed for webcompat.

## Before:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|AArch64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86 on x86_64|... Windows NT 10.0; WOW64; ...|"Windows NT 10.0; WOW64"|"Win32"
Windows|x86_64|"... Windows NT 10.0; Win64; x64; ..."|"Windows NT 10.0; Win64; x64"|"Win32"
Linux|x86|"... Linux i686; ..."|"Linux i686"|"Linux i686"
Linux|x86 on x86_64|"... Linux i686 on x86_64; ..."|"Linux i686 on x86_64"|"Linux i686 on x86_64"
Linux|x86_64|"... Linux x86_64; ..."|"Linux x86_64"|"Linux x86_64"
Android|ARMv7|"... Android 8.1.0; ..."|"Linux armv7l"|"Linux armv7l"
Android|AArch64|"... Android 8.1.0; ..."|"Linux aarch64|"Linux aarch64"
macOS|x86_64|"... Macintosh; Intel Mac OS X 10.14; ..."|"Intel Mac OS X 10.14"|"MacIntel"

## Changed:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|x86 on x86_64|**"... Windows NT 10.0; ..."**|**"Windows NT 10.0"**|"Win32"
Windows|x86_64|**"... Windows NT 10.0; ..."**|**"Windows NT 10.0"**|"Win32"
Linux|x86|**"... Linux; ..."**|**"Linux"**|**"Linux"**
Linux|x86 on x86_64|**"... Linux; ..."**|**"Linux"**|**"Linux"**
Linux|x86_64|**"... Linux; ..."**|**"Linux"**|**"Linux"**
Android|ARMv7|"... Android 8.1.0; ..."|**"Linux"**|**"Linux"**
Android|AArch64|"... Android 8.1.0; ..."|**"Linux"**|**"Linux"**

## Unchanged:

OS|Architecture|User-Agent's OS/CPU|navigator.oscpu|navigator.platform
-|-|-|-|-
Windows|AArch64|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
Windows|x86|"... Windows NT 10.0; ..."|"Windows NT 10.0"|"Win32"
macOS|x86_64|"... Macintosh; Intel Mac OS X 10.14; ..."|"Intel Mac OS X 10.14"|"MacIntel"

Back to Bug 1556223 Comment 0