[webkit-dev] Re: Qt's default webkit user agent
Alp Toker
alp at atoker.com
Tue Feb 12 02:03:38 PST 2008
Benjamin Meyer wrote:
> As it is today Qt's default user agent (in qwebpage.cpp) is hard coded to:
>
> "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/523.15 (KHTML,
> like Gecko) Safari/419.3 Qt"
>
> Seeing as this library will be used inside of many other applications it makes
> sense to include by default at least the application name/version when they
> are set. QCoreApplication gives us several strings which can be used.
>
> applicationName, applicationVersion, organizationDomain, organizationName
>
> But at a bigger question, what should be included (or not included) with the
> default user agent? Is there docs anywhere that suggest what webkit library
> users should use as their user agent string?
We did some research for the GTK+ port and tried to integrate the most
important UA string compatibility hacks without making the string too
ugly. The code in WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
documents each UA string element with comments. It's fairly general and
is intended to be moved down into WebCore.
If you decide to use this code, please submit any fixes through the bug
tracker. Hope it helps.
(It's disappointing to see the growing number of WebCore changes in Qt's
git tree that could benefit the whole project. Are you planning to
submit these changes for review?)
More information about the webkit-dev
mailing list