forked from gr2m/appcache-nanny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (69 loc) · 3.19 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>appCache appCacheNanny – Teaches the applicationCache douchebag some manners!</title>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.css">
<style>
html, body { padding: 0; margin: 0; font-family: Helvetica, Arial; }
.main { padding: 18px; }
h1 { margin: 0; font-size: 28px; font-weight: bold; }
h6 { margin: 0; }
header { padding: 18px 18px 24px; background: #222; color: #fff; background-image: linear-gradient(90deg, #2C2A86 20.5%, #078D2D 20.5%, #078D2D 37.5%, #FCB20D 37.5%, #FCB20D 55.5%, #EC5100 55.5%, #EC5100 72.5%, #6A3C06 72.5%, #6A3C06 79.5%, #C01C1B 79.5%); /* hoodie hoodie hoodie! */ background-size: 300px 6px; background-repeat: repeat-x; background-position: 0 100%; }
header a { color: #fff !important; }
pre {margin: 18px -18px; padding: 18px; border-radius: 0; }
</style>
</head>
<body>
<header>
<h1>appCache appCacheNanny</h1>
<h6>Made by <a href="http://hood.ie">team Hoodie</a> with love. <a href="https://www.gittip.com/hoodiehq/">Leave a tip</a> or <a href="https://github.com/gr2m/appcache-nanny">fork this</a>.</h6>
</header>
<div class="main">
<h3>Teaches the applicationCache douchebag some manners!</h3>
<p>
As we all know, the <a href="http://alistapart.com/article/application-cache-is-a-douchebag">Application Cache is a Douchebag</a>.
It's time to teach it some manners – The appCache Nanny for Rescue!
</p>
<p>
No more manifest attributes on your HTML files. Weathere you want to cache
your assets offline or not, when to start ... you are in control™
</p>
<p>
<code>appCacheNanny</code> checks automatically for new updates and applies them for you, so they become visible
next time you reload the app. It provides a simple JavaScript API, too
</p>
<pre>
// start to check for updates every 30s
appCacheNanny.start()
// optionally, pass intervals in ms
appCacheNanny.start({checkInterval: 10000})
// you can also check for updates at any time
appCacheNanny.check()
// The appCache nanny tells you if there is a new update available
appCacheNanny.hasUpdate()
// She tells you about all relevant applicationCache events
appCacheNanny.on('error', handleError)
appCacheNanny.on('obsolete', handleObsolete)
appCacheNanny.on('noupdate', handleNoupdate)
appCacheNanny.on('downloading', handleDownloading)
appCacheNanny.on('progress', handleProgress)
appCacheNanny.on('cached', handleCached)
appCacheNanny.on('updateready', handleUpdateready)
// plus some extra ones
appCacheNanny.on('init:downloading', handleInitDownloading);
appCacheNanny.on('init:progress', handleInitProgress);
appCacheNanny.on('init:cached', handleInitCached);
appCacheNanny.on('start', handleStart);
appCacheNanny.on('stop', handleStop);</pre>
<p>
<code>appCacheNanny</code> is extracted from and battle-tested in <a href="https://minutes.io">minutes.io</a>.
Get more instructions and file issues on <a href="https://github.com/gr2m/appcache-nanny">GitHub</a>.
</p>
</div>
<script src="bower_components/jquery/jquery.js"></script>
<script src="appcache-nanny.js"></script>
<script>
</script>
</body>
</html>