[webkit-gtk] Dynamic user agent

Carlos Garcia Campos cgarcia at igalia.com
Thu May 8 23:42:01 PDT 2014

El jue, 08-05-2014 a las 12:08 -0700, Martin Robinson escribió:
> 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.

Thanks for the summary.

> 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.

Yes, there will always be sites broken, but we have been changing the UA
string in the past to fix specific cases and we have ended up breaking a
lot of other sites that are doing things right and don't need special
cases (like bugzilla setting the OS as MAC or many other sites that
provides mac downloads by default). So, I think we should consider sites
that are broken as the exception and not the other way around like we do

>  For instance, Google properties will probably try to
> use Chrome specific features.

Yes, that was also my concern.

>  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.

That's exactly what I did, and the reason why the patch includes a
comment for every quirk with the URL of the bug.

>  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.

I don't understand this, if sites are working with the current UA, we
just need to make sure we keep using that UA for those specific sites
that break. It's a matter of filing bugs when we detect something is
broken because of the UA.

> --Martin

Carlos Garcia Campos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140509/e226e366/attachment.sig>

More information about the webkit-gtk mailing list