[webkit-gtk] Dynamic user agent
mrobinson at webkit.org
Thu May 8 12:08:33 PDT 2014
On Thu, May 8, 2014 at 9:18 AM, Gustavo Noronha Silva <gns at gnome.org> wrote:
> No worries, I kinda thought I had moved that to WebCore so it could be
> shared, but I just dreamed of it, I guess =P
I think this is the way it went down:
1. In the beginning, we had our own custom user agent.
2. Gustavo added code to send the Safari user agent (on the Linux
platform) for some specific sites.
3. We switched to using the Safari user agent all the time.
4. Some sites saw Safari+Linux and assumed we were iOS, so we switched
to the Chrome user agent.
5. Some sites were broken with the Chromium user agent so we switched
to Safari+OS X to ensure we get the desktop version of the site, but
don't get Chromium specific features.
Somewhere in there the code was moved to WebCore and shared between
WebKit1 and WebKit2.
It's sad that we need to move back to using site specific quirks
again, because inevitably some sites will be broken even when the
quirk triggers. For instance, Google properties will probably try to
use Chrome specific features. For whoever implements this fix, it will
be important to go back through all the user-agent bugs and test all
the sites that have broken in the past. Some sites are going to break
no matter what, so we need to decide what is the least bad way in
which things can break.
More information about the webkit-gtk