faisalman / ua-parser-js

"Unmask Your Traffic" - UAParser.js: The Essential Web Development Tool for User-Agent Detection
https://uaparser.dev/
GNU Affero General Public License v3.0
9.28k stars 1.19k forks source link

user agent gets probably parsed incorrectly as Safari v16 instead of Safari 11(?) #761

Closed Llois41 closed 1 week ago

Llois41 commented 2 weeks ago

Library version

https://uaparser.dev link: https://uaparser.dev/?ua=Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/605.1.15%20(KHTML,%20like%20Gecko)%20Version/16.0%20Safari/605.1.15#demo

Describe the bug When parsing 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15' it resolves to Safari v16. This does not seem to be correct since WebKit engine version 605.1.33 seems to equal Safari v11.1 (see https://github.com/mdn/browser-compat-data/blob/main/browsers/safari.json#L132)

image

(also seen in the uaparser UI link above)

To Reproduce parse given user agent above

Expected behavior user agent above should be parsed correctly and not as Safari v16

Screenshots see above

faisalman commented 2 weeks ago

The version of WebKit engine has been frozen since Safari 11, as for the Safari version, it can be easily identified from the Version/<Version> token^1.

Llois41 commented 1 week ago

@faisalman Ah that makes sense, now that you mention it, it seems like the other Safari versions I see use the same WebKit engine version. Thanks for clarifying, I'll close this one.