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
4
1.1k
HTML5 Application Caching
Ryan McGeary
February 05, 2012
Tweet
Share
More Decks by Ryan McGeary
See All by Ryan McGeary
Cloud Services You Should Be Using To Build Your Startup
rmm5t
1
710
Asynchronous Collaboration
rmm5t
5
1.3k
How We Use MongoDB at BusyConf (Take Two!)
rmm5t
2
170
Just In Time Inventory with Spree
rmm5t
3
1.8k
How We Use MongoDB at BusyConf
rmm5t
2
740
CoffeeScript
rmm5t
5
710
One Man Lightning Talks
rmm5t
2
430
Do Your Commit Messages Suck?
rmm5t
5
1.9k
Other Decks in Technology
See All in Technology
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
1
420
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
270
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
500
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
170
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
[E2]CCoEはAI指揮官へ。Bedrock×MCPで構築するコスト・セキュリティ自律運用基盤
taku1418
0
190
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
180
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
280
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
170
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
860
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
200
銀行の内製開発にて2つのプロダクトを1つのチームでスクラムしてみてる話
koba1210
1
140
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
How to Ace a Technical Interview
jacobian
281
24k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
480
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
640
Designing for Timeless Needs
cassininazir
0
170
Scaling GitHub
holman
464
140k
Bash Introduction
62gerente
615
210k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
140
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Designing for Performance
lara
611
70k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
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