[Webkit-unassigned] [Bug 278284] WKWebView version not available in API and not included in user agent for macOS
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 21 07:17:14 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=278284
Michael Catanzaro <mcatanzaro at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mcatanzaro at redhat.com
--- Comment #4 from Michael Catanzaro <mcatanzaro at redhat.com> ---
(In reply to Steve Repsher from comment #2)
> TBH, I'm not sure what that question has to do with the merit of the report?
> But to divulge for a moment, my primary use case is for an open source app
> called Home Assistant. We have a build for modern browsers, and a heavily
> transpiled and polyfilled build for legacy browsers. While we use feature
> detection as backup, splitting based on known browser version is far more
> convenient and virtually free of maintenance over time.
You're assuming the Safari version indicates Safari, but it could be any WebKit-based browser. You have to assume the Safari version is a lie. Notably, if you see Version/18.0 and assume the browser exposes the same features as Safari 18.0, or has the same bugs as Safari 18.0, or is more than vaguely similar to Safari 18.0, then you've messed up.
(In reply to Steve Repsher from comment #2)
> Safari browser on every platform currently sends the correct version in the
> user agent header. A WKWebView on iPhone and iPad does the same. So, I
> don't understand the need for justification of its use here when WebKit is
> already doing it. This report is simply pointing out the discrepancy with
> WKWebView on macOS, and the inability of app authors to manually retrieve it
> with the current API. That seems like an oversight rather than a conscious
> choice by Apple, no?
Fair point. I agree. It doesn't make sense for WKWebView to provide a Safari version on iOS but not on macOS.
> So if I understand you would rather have ?
>
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 <applicationNameForUserAgent>
The Version/18.0 is mandatory for web compatibility. Might as well be nice to WKWebView applications and add it.
What I'd prefer is to just change the Version to something static, say Version/42.0, and leave it frozen forever. Then we won't have to play version number games with websites like in https://github.com/nextcloud/server/issues/40793
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240821/f297de53/attachment.htm>
More information about the webkit-unassigned
mailing list