Work around deprecation of offline capabilities
This commit is contained in:
@@ -59,6 +59,7 @@ function initSession(){
|
||||
|
||||
// Check if a new cache is available on page load. || TODO: the Server could notify for new versions, then the check would be done closer to time.
|
||||
window.addEventListener('load', function(e) {
|
||||
try{
|
||||
window.applicationCache.addEventListener('updateready', function(e) {
|
||||
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
|
||||
// Intentially not calling swapcache here, it's quite useless because it will only use the new verstion for newly loaded files anyway...
|
||||
@@ -69,6 +70,9 @@ function initSession(){
|
||||
// Manifest didn't changed. Nothing new to server.
|
||||
}
|
||||
}, false);
|
||||
} catch (ex) {
|
||||
console.log("Quick Fix - switch off AppCachea",ex);
|
||||
}
|
||||
}, false);
|
||||
|
||||
var indexHtmlRevision = $("#lbRevision").text().split(" ")[1];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
|
||||
<html lang="en" manifest="cache.manifest">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- meta name="apple-mobile-web-app-capable" content="yes" / TODO: prevents from cache refreshing! -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
@@ -26,8 +26,11 @@
|
||||
|
||||
$(document).bind('pageinit',function() {
|
||||
defineDisplayStatus();
|
||||
try {
|
||||
if (applicationCache.status==applicationCache.IDLE) { applicationCache.update(); }
|
||||
|
||||
} catch(ex) {
|
||||
console.log("Quick fix switch off appCache",ex);
|
||||
}
|
||||
$("#lbHeading").text("Shopping List");
|
||||
$("#pnlHeading").show();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user