UserAgent in KHTML

Baumann, Thomas baumann at valudo.de
Tue Jul 6 13:27:24 BST 2004


Hi there,

does anyone know how to change the UserAgent KHTML uses?? We tried to to
manipulate the MetaData of KParts::URLArgs in our version of
KHTMLPart::open(), which was successful for all Documents.

> KParts::URLArgs myargs;
> QMap<QString, QString> & metaData = myargs.metaData();
> metaData["UserAgent"] = "My UserAgent";

Unfortunately, the images and all other stuff seem to be loaded using
anything else, but not KHTMLPart::open() (which is good, of course ;)) )

We also had a look at KProtocolManager, but there was just a possibility to
get varios kinds of Konqueror-agents (You know, the ones with or without
architechture, os etc.).

Now we are completeley lost in the KDE-sources. There has to be a point to
change the Agent globaly, isn't there?? So, can anyone help us changing the
UserAgent to any string??

Please help!!

Thanks a lot,
best regards,

Thomas Baumann




More information about the kfm-devel mailing list