Bug 233073 - REGRESSION: Version not included in UA
Summary: REGRESSION: Version not included in UA
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 15
Hardware: Unspecified iOS 15
: P2 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-12 15:18 PST by Teodor
Modified: 2021-11-12 17:19 PST (History)
1 user (show)

See Also:


Attachments
iPhone XR with iOS 15.2 Beta (57.45 KB, image/jpeg)
2021-11-12 15:18 PST, Teodor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Teodor 2021-11-12 15:18:27 PST
Created attachment 444114 [details]
iPhone XR with iOS 15.2 Beta

Starting with iOS 15.1 and continuing with iOS 15.2 Beta, there are issues with Version/X in User Agent string:

- WKWebView on iOS 15.1 omits "Version" from UA
ex. Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 OptionalCustomUAString

- WKWebView on iOS 15.2 Beta omits "Version" from UA
ex. Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 OptionalCustomUAString

- Safari on iOS 15.2 Beta uses "Version/15.1" in UA
ex. Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Mobile/15E148 Safari/604.1

Version is an integral part of Safari's UA and most, if not all, UA parser libraries don't assume that browser version is the same as iOS version, and thus report no browser version at all.
Using `bowser` (https://www.npmjs.com/package/bowser) as an example. If you load https://bowser-js.github.io/bowser-online/ in WKWebView on iOS 15.1 or 15.2 Beta, you will see that no `browser` version is parsed.
Comment 1 Michael Catanzaro 2021-11-12 15:46:23 PST
Could you show an example of the previous ("good") UA header, please?
Comment 2 Teodor 2021-11-12 17:19:21 PST
It seems that WKWebView never had "Version/X" in the UA string. Strangely this was not having an effect until the most recent release. Closing for now while I investigate this further.