QWebView Offline Cache doesn't work but is enabled



  • Hello,
    I am creating an HTML5 app that caches the content (using a manifest) so that the app can be mostly used offline. It was initially tested on Google Chrome and works, when the server is turned off it still works just fine and when the app changes Google Chrome notifies me that an update is available for it.

    Switching to Qt I enabled several global settings for QWebSettings including Offline Storage, Offline Cache, and Local Storage. Before that I also enabled persistent storage and pointed to a folder on my computer. The app loads fine but when switching off the server it doesn't load meaning it never used the cache.

    Upon looking in the developer extras inspector I see that it is indeed cached in the Application Cache section showing all the files yet it's like it doesn't use the files. Also upon looking in designated persistent storage folder, I'm seeing several files there so it's definitely also using the physical folder.



  • I found out that the problem is it's attempting to go to the link instead of checking the storage first, after it successfully loads the link then it uses the storage and updates if needed but if the link is offline the whole page won't load which defeats the whole purpose of the storage.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.