[Qtwebengine] Sharing data between QWebEngineProfiles

Florian Bruhin me at the-compiler.org
Thu Aug 20 13:52:09 CEST 2015


* Allan Sandfeld Jensen <kde at carewolf.com> [2015-08-20 13:37:37 +0200]:
> On Thursday 20 August 2015, Florian Bruhin wrote:
> > Hi,
> > 
> > I (from qutebrowser[1]) and Emdek (from Otter Browser[2]) discussed
> > what's still missing for us from QtWebEngine, and one point which came
> > up and wasn't discussed already is sharing data between multiple
> > QWebEngineProfiles.
> > 
> > Our use-case is to have per-domain and possibly per-tab settings, e.g.
> > the user want to configure the user-agent differently based on the
> > page they're visiting.
> > 
> > This means you'll end up with having a new QWebEngineProfile for every
> > tab - however, that also means every tab will have its own persistent
> > storage, cookie store, and cache - right?
> > 
> > Is it possible/planned to share data between QWebEngineProfiles so one
> > can implement this kind of thing?
> > 
> > I guess one possibility is to use the same storageName for all of them
> > - but will that work?
> > 
> No, that would not be how profiles are supposed to be used. If you need 
> different user-agent string per page, we should probably make a separate API 
> for that (in fact the Chromium API we use already have separate mechanisms for 
> overriding user-agent on a per page basis.

But I wonder - what's the reason things like httpUserAgent or
persistentCookiesPolicy (i.e. things you might want to set
per-tab/domain/...) are in QWebEngineProfile rather than
QWebEngineSettings?

I guess it would be possible to control those per page using the new
QWebEngineCookieStoreClient and QWebEngineUrlRequestInterceptor APIs,
right? But I still feel like this kind of thing should be simpler and
probably be in QWebEngineSettings which can be set per-page.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20150820/ccabe165/attachment-0001.sig>


More information about the QtWebEngine mailing list