forked from jamespizzurro/metrohero-webapp
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.appcache.html
More file actions
20 lines (20 loc) · 800 Bytes
/
Copy pathindex.appcache.html
File metadata and controls
20 lines (20 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!doctype html>
<html manifest="index.appcache">
<head>
<script>
// our iOS app caches index.html in its browser cache (a different cache from AppCache!) so that it can serve it up offline,
// but that version can be out of sync with the version in AppCache, so we need to reload index.html to bypass the browser cache
// note that this has the effect of not allowing folks to start using the iOS app if they boot it up while they don't have an Internet connection
if (window.localStorage) {
if (!window.localStorage.getItem('firstLoad')) {
window.localStorage.setItem('firstLoad', 'true');
window.parent.window.location.reload(true);
} else {
window.localStorage.removeItem('firstLoad');
}
}
</script>
</head>
<body>
</body>
</html>