[webkit-dev] User agent woes
mjs at apple.com
Mon May 8 13:40:38 PDT 2017
> On May 8, 2017, at 1:30 PM, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
> On Mon, May 8, 2017 at 3:13 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>> The ideal scenario would be for Google Hangouts to correctly handle WebKit UA strings on X11 platforms. It seems like Safari claiming to be Mac Firefox would be a move in the wrong direction. (It might also cause Hangouts to try to use features that are unsupported in Mac Safari.)
>> What happens on Google Hangouts if you use your normal UA string?
> I think it works just fine with our normal UA string, as it does with our current Firefox quirk, actually. We could try adding url.host() != talkgadget.google.com and url.host != hangouts.google.com checks to the urlRequiresFirefoxBrowser function, but I don't see any need to do so. I only mentioned Hangouts here to note that it prevents us from using a macOS quirk for Google unless we're able to target a specific subdomain, which is not always possible (e.g. maps.google.com is now just a redirect to google.com/maps). If we try sending different quirks based on the URL path, then getting the quirk to work becomes quite tricky because it requires figuring out the right set of subresources on the page for which to receive the quirk. So far, I've managed to avoid that mess.
I see, so your Google UA string is a tricky balancing act between the weird needs of many sites.
> By the way, the icing on the cake is that X11 is only in the user agent for compatibility purposes... Fedora has replaced X11 with Wayland now, and Ubuntu will too in its next release this October. But removing X11 breaks some websites (including Google Calendar), so it's going to have stay forever.
We have seriously considered freezing our UA string forever because even smaller changes than this can cause compat issues.
More information about the webkit-dev