RESOLVED FIXED 241322
Mobile Safari desktop mode user agent reports a different macOS version than Safari on Mac
https://bugs.webkit.org/show_bug.cgi?id=241322
Summary Mobile Safari desktop mode user agent reports a different macOS version than ...
Nitin Seshadri
Reported 2022-06-05 19:27:37 PDT
When Mobile Safari is set to request the desktop website in iOS and iPadOS, it reports a user agent string with the macOS version as 10.15.6: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15 On the other hand, Safari on Mac always reports the macOS version as 10.15.7: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15 This inconsistency should be fixed (i.e. Mobile Safari should report 10.15.7 in desktop mode) because it could make it easier for a website to detect whether the visitor is using Mac Safari or is using Mobile Safari, defeating the purpose of desktop mode.
Attachments
Patch (1.04 KB, patch)
2022-06-05 20:02 PDT, Nitin Seshadri
no flags
Patch (1.55 KB, patch)
2022-06-06 12:44 PDT, Nitin Seshadri
no flags
Patch (1.63 KB, patch)
2022-06-06 15:18 PDT, Nitin Seshadri
no flags
Nitin Seshadri
Comment 1 2022-06-05 20:02:15 PDT
Sam Sneddon [:gsnedders]
Comment 2 2022-06-06 05:05:15 PDT
This has repeatedly bugged me (after all, it provides another way to sniff for iOS v. macOS), but I've never taken the small amount of time to actually fix this. (Thanks Nitin!)
Alexey Proskuryakov
Comment 3 2022-06-06 09:47:34 PDT
Thank you for the patch! Would you be willing to re-submit it with a commit message? It cannot be landed without one. `webkit-patch upload` would include the commit message, and you can confirm that its format matches existing landed commits. It looks like https://webkit.org/contributing-code/ is currently out of date, we need to fix it ASAP.
Nitin Seshadri
Comment 4 2022-06-06 12:44:55 PDT
Nitin Seshadri
Comment 5 2022-06-06 12:45:27 PDT
(In reply to Alexey Proskuryakov from comment #3) > Would you be willing to re-submit it with a commit message? It cannot be > landed without one. `webkit-patch upload` would include the commit message, > and you can confirm that its format matches existing landed commits. done!
Alexey Proskuryakov
Comment 6 2022-06-06 14:29:18 PDT
Sorry, it's not quite it yet (needs a "Reviewed by NOBODY (OOPS!)" line, otherwise tooling that replaces it with an actual reviewer name won't work). I think that if you reset, run `git-webkit setup`, and re-commit, the correct template should be generated.
Nitin Seshadri
Comment 7 2022-06-06 15:18:37 PDT
Nitin Seshadri
Comment 8 2022-06-06 15:19:23 PDT
(In reply to Alexey Proskuryakov from comment #6) > Sorry, it's not quite it yet (needs a "Reviewed by NOBODY (OOPS!)" line, > otherwise tooling that replaces it with an actual reviewer name won't work). > > I think that if you reset, run `git-webkit setup`, and re-commit, the > correct template should be generated. Should be fixed now.
Alexey Proskuryakov
Comment 9 2022-06-06 15:57:15 PDT
Comment on attachment 460054 [details] Patch Let's see what happens!
EWS
Comment 10 2022-06-06 17:16:04 PDT
Committed r295305 (251347@main): <https://commits.webkit.org/251347@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460054 [details].
Radar WebKit Bug Importer
Comment 11 2022-06-06 17:17:16 PDT
Note You need to log in before you can comment on or make changes to this bug.