Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HTML5 Application Caching
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryan McGeary
February 05, 2012
Technology
1.1k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTML5 Application Caching
Ryan McGeary
February 05, 2012
More Decks by Ryan McGeary
See All by Ryan McGeary
Cloud Services You Should Be Using To Build Your Startup
rmm5t
1
730
Asynchronous Collaboration
rmm5t
5
1.3k
How We Use MongoDB at BusyConf (Take Two!)
rmm5t
2
180
Just In Time Inventory with Spree
rmm5t
3
1.8k
How We Use MongoDB at BusyConf
rmm5t
2
760
CoffeeScript
rmm5t
5
730
One Man Lightning Talks
rmm5t
2
450
Do Your Commit Messages Suck?
rmm5t
5
2k
Other Decks in Technology
See All in Technology
三人寄ればチューリング完全
puhitaku
6
2.9k
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
0
640
AIのためのEthernet技術動向 (SerDes)
markunet
1
300
自宅NWにISR4331を導入してみた話
okaits
0
120
AI時代に、人は何を、どう学ぶのか #pbl_pub / What and How Do We Learn in the AI Era?
takaking22
1
240
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
140
Rust×eBPFでEDRっぽいものをつくる
sunlife3
2
820
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
0
560
あなたの知らないバージョン命名規則
sat
PRO
2
110
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9.4k
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
500
AI・HPC開発を支えるGPU環境の新しい選択肢 液冷GPUシステム「AquSys」の取り組み
gpuunite_official
0
220
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
500
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
480
The Invisible Side of Design
smashingmag
301
52k
Git: the NoSQL Database
bkeepers
PRO
432
67k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Skip the Path - Find Your Career Trail
mkilby
1
190
A Tale of Four Properties
chriscoyier
163
24k
Designing for Performance
lara
611
70k
Documentation Writing (for coders)
carmenintech
77
5.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Odyssey Design
rkendrick25
PRO
2
770
Transcript
HTML5 Application Caching There are only two hard things in
Computer Science: cache invalidation and naming things. -- Phil Karlton Ryan McGeary http://ryan.mcgeary.org @rmm5t
diveintohtml5.info
Browser Support
Cache Manifest <!DOCTYPE HTML> <html manifest="/mobile.manifest"> <body> ... </body> </html>
text/cache-manifest
CACHE Sections CACHE MANIFEST http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js /stylesheets/screen.css /data.json
NETWORK Sections CACHE MANIFEST NETWORK: * CACHE: http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js
/stylesheets/screen.css /data.json
FALLBACK Sections CACHE MANIFEST FALLBACK: / /offline.html NETWORK: * CACHE:
http://www.google-analytics.com/ga.js /favicon.ico
Expiring The Cache CACHE MANIFEST # Updated: <%= something.updated_at %>
# Released: <%= application_released_at %> NETWORK: * CACHE: # ...
window.applicationCache swapCache() checking downloading progress cached error updateready already cached?
NO YES updated manifest? noupdate NO YES
window.applicationCache.status 0: window.applicationCache. UNCACHED 1: window.applicationCache. IDLE 2: window.applicationCache. CHECKING
3: window.applicationCache. DOWNLOADING 4: window.applicationCache. UPDATEREADY 5: window.applicationCache. OBSOLETE
Debugging Tips about:about
Debugging Tips https://gist.github.com/1714753
Debugging Tips or Use:
Gotchas! #1 The manifest is downloaded twice during a sync.
Gotchas! #2 Beware of swapCache
Gotchas! #3 Make sure your manifest file isn’t cached.
DEMO Let’s play some music.
Ryan McGeary ryan.mcgeary.org @rmm5t
[email protected]
McGeary Consulting Group