New issue
Advanced search Search tips

Issue 664622 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 674723



Sign in to add a comment

Add Windows 10 build number to user-agent

Reported by fra...@microsoft.com, Nov 11 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Steps to reproduce the problem:
The Microsoft Edge team has received a lot of requests from web developers asking for the ability to detect the exact Windows 10 version via browsers. This information is already available in Microsoft Edge, and we’re asking all Windows browsers to expose the exact version information as well.

Windows 10 gets ~2 major updates a year; so far, there haves been three major releases of Windows 10:
Windows 10 (Version 10.0.10240)
Windows 10 November Update	(Version 10.0.10586)
Windows 10 Anniversary Update (Version 10.0.14393)
…with Windows 10 “Creators Update” due in Spring 2017.

Every update has major UX and feature changes, and developers would like the version information to:

-	Target their web & app content, where the OS version is a factor. As an example, Paint 3D is one such example of such an app http://www.theverge.com/2016/10/26/13430466/microsoft-paint-3d-app-download-preview
-	Log the OS version more accurately for RUM scenarios, where this data can be key to understanding performance regressions in the wild
-	Log the OS version in bug reporting / troubleshooting scenarios
-	Prompt the user to upgrade their device – especially in BYOD enterprises
-	Give website visitors accurate step-by-step instructions in scenarios where they have to change Windows settings / use Windows UI
-	Match native UI look-and-feel 

Microsoft Edge exposes the full Windows build number in the UA string (In the case of Windows 10.0.14393):
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393

We’re changing our UA string to make the Windows version more obvious:
Mozilla/5.0 (Windows NT 10.0.14393; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14

…as it maps better to Windows version APIs (https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx)

DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber

We’re asking all Windows browsers to expose the full version along with us:

Before: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
After:  Mozilla/5.0 (Windows NT 10.0.14393; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

…as it gives us all a clean way to help developers detect the correct version of Windows 10. This isn't really a change in principle - previously this level of OS update would have changed the minor OS version (and that was reported in IE/Chrome/Mozilla UA strings previously), but now major.minor is fixed at 10.0 for app compat reasons and it's only the build number that changes.  ‘Build number’ is somewhat of a misnomer here – in practice, the number indicates the OS minor version number now.

No security information (patch level) information is exposed in the Windows OS build number (security patches don’t change the OS build number; the (same, if applicable) security updates go to all versions of Windows 10 that are in use).

The Windows 10 consumer population is upgraded quickly via Windows Update; this change should have limited fingerprinting impact.

We’ve tested this change for compatibility issues with browser-sniffing libraries, and we’ve found no regressions.

This change also bring the user agent string for Windows browsers more in line with Android, iOS, macOS, where the full version is used.

What is the expected behavior?

What went wrong?
See repro steps

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 54.0.2840.71  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 

Comment 1 by rbyers@chromium.org, Nov 12 2016

Cc: jsc...@chromium.org
Labels: Hotlist-GoodFirstBug M-57 Hotlist-Interop
Status: Available (was: Unconfirmed)
I think we should do this.  TL;dr the Windows versioning scheme has changed, adding the 3rd number for Win 10 is consistent with the 2-part version numbers we supplied for older version of windows.  There's also interop benefits to matching Edge here.

I assume we'd make this change only when the major version is >=10 and leave things as-is for older version of Windows.

I believe this is trivial to do.  Just tweak the logic in the version number string (https://cs.chromium.org/chromium/src/content/common/user_agent.cc?rcl=0&l=110) and plumb through the build as the bugfix_version in OperatingSystemVersionNumbers https://cs.chromium.org/chromium/src/base/sys_info_win.cc?rcl=0&l=150).

Comment 2 Deleted

Comment 3 by ratsu...@gmail.com, Nov 29 2016

I'm working on this issue and hope can upload the patch in one or two days.

Comment 4 by ratsu...@gmail.com, Nov 29 2016

Patch uploaded: https://codereview.chromium.org/2533303003/
Rick, do you think this needs to go through any sort of intent or fyi, since it does change web-visible behavior slightly?
Cc: pkasting@chromium.org
adding pkasting who in the past tried to remove information from the UA string
Owner: rbyers@chromium.org
Status: Started (was: Available)
ratsunny@: Thanks for picking this up!

> Rick, do you think this needs to go through any sort of intent or fyi, since it does change web-visible behavior slightly?

No, I don't think it does.  There is no change in spirit, we're just effectively fixing the bug that information got lost in Win10 due to Microsoft changing the meaning of their version numbers.  Any UA string change poses some compat risk, but in this case we're just matching Edge behavior so I'd consider the compat risk to be "trivial" and so not worth the overhead of an intent.

I really don't think it's worth rehashing all the "what should the UA String be" debates for this (I hate the UA string as much as everyone else).  This is just a bugfix to account for changes to Windows and better align us with other popular browsers on Windows.

Assigning to myself as a proxy.
I'm fine with this change.
We've just noticed that some services except two version tokens (10.0) for Windows and will break when it's changed to three (10.0.14393).

Is appending the build number through some other scheme out of the question?
Blockedon: 674723
Project Member

Comment 11 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab2b82e8113c870224036ffdb2a49a429836c76a

commit ab2b82e8113c870224036ffdb2a49a429836c76a
Author: robliao <robliao@chromium.org>
Date: Fri Dec 16 03:10:50 2016

Revert of Add Windows 10 build number to user-agent (patchset #1 id:1 of https://codereview.chromium.org/2533303003/ )

Reason for revert:
This can cause services expecting a Windows user-agent of only two version tokens (10.0) to break.

Original issue's description:
> Add Windows 10 build number to user-agent
>
> The build number would be added to the version string in UA
> only if the major version of Windows is equal or greater than 10.
> Nothing would be changed for the old version of Windows.
>
> BUG=664622
>
> Committed: https://crrev.com/bb034491431fa28ce9b2be66b17c0417dffebc13
> Cr-Commit-Position: refs/heads/master@{#437532}

TBR=jochen@chromium.org,dcheng@chromium.org,pkasting@chromium.org,rbyers@chromium.org,ratsunny@gmail.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=664622,  674723 

Review-Url: https://codereview.chromium.org/2581033002
Cr-Commit-Position: refs/heads/master@{#438996}

[modify] https://crrev.com/ab2b82e8113c870224036ffdb2a49a429836c76a/base/sys_info_win.cc
[modify] https://crrev.com/ab2b82e8113c870224036ffdb2a49a429836c76a/content/common/user_agent.cc

Labels: -M-57 M-59
Labels: M-61
Labels: -M-59 -M-61

Sign in to add a comment