Application cache with QtWebkit
-
It's possible the use AppCache with QtWebkit,
"Example of AppCache in HTML5":http://www.html5rocks.com/en/tutorials/appcache/beginner/I use qt 4.8 and I try the webview on qml and widget.
these are the option that I use for create the webview
@
webView->page()->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
webView->page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
webView->settings()->enablePersistentStorage("my path");
@and on my html page I have this script to check if the manifest file was changed
@
function init() {
setInterval("updatePage();",3000);
}
function updatePage(){
var status = window.applicationCache.status;
document.getElementById('txt')[removed] = "status: "+status;
window.applicationCache.update();
}
@On the web browser (e.g. chrome) the div txt is egual to 1 or 4 if I change the manifest file.
On the qt application is always 0, that's means the application is not prepared to receive cache.