[Qtwebengine] QWebengine and forcing to load from cache

Koehne Kai Kai.Koehne at theqtcompany.com
Mon Aug 17 14:01:16 CEST 2015


> -----Original Message-----
> From: qtwebengine-bounces+kai.koehne=theqtcompany.com at qt-
> Subject: [Qtwebengine] QWebengine and forcing to load from cache
> 
> 
> Our application requires the ability to run in an artificial “offline” mode
> (where the user chooses to be “offline” but isn’t really disconnected from
> the network)  and in that case, we’ve been using QNetworkAccessManager
> to force load from the cache by setting the CacheLoadControlAttribute to
> QNetworkRequest::AlwaysCache.
> 
> We’re in the process of switching to QtWebEngine which I understand does
> not interact with QNetworkAccessManager.  Is there a way for us to force
> load from the web cache?

Hi,

I'm afraid there's no direct way to achieve the same in QtWebEngine. As you've noticed, QtWebEngine uses Chromiums' network stack, and there's no public API to manipulate the caching. There's also an upstream bug about an 'offline mode' which however is set to WONTFIX:

https://code.google.com/p/chromium/issues/detail?id=2204

Regards

Kai


More information about the QtWebEngine mailing list