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
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
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
750
CoffeeScript
rmm5t
5
720
One Man Lightning Talks
rmm5t
2
440
Do Your Commit Messages Suck?
rmm5t
5
2k
Other Decks in Technology
See All in Technology
エムスリーテクノロジーズ株式会社 エンジニア向け紹介資料 / M3 Technologies Company Deck
m3_engineering
0
220
[みん強]AIの価値を最大化するデータ基盤戦略:Self-Service型Data Meshへの転換とAgentic AI Meshに向けた取り組み with Snowflake他
y_matsubara
1
180
ANDPAD Ruby sponsor session in RubyKaigi 2026
andpad
0
140
Amazon Bedrock で生成AI活用サービスをセキュアに構築する方法
takanorig
1
110
情シスがMCP環境導入時に打ちのめされる認可の崖
oidfj
0
310
自作エディターをOSSにして分かった、一人に刺さる開発が世界を動かす理由
shinyasaita
1
290
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
1
330
既存プロダクトQAから新規プロダクトQAへ
ryotakahashi
0
190
ジュニアエンジニアはSREとどう向き合うべきか
nrinetcom
PRO
1
110
DI コンテナ自動生成ツールを実装してみた / intro-autodi
uhzz
0
840
Splunk MCPサーバの利活用事例 ーKINTOテクノロジーズの取り組み
kintotechdev
1
270
AIコーディングエージェントの活用で、コードは静かに肥大化した
yosukeshinoda
1
290
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
First, design no harm
axbom
PRO
2
1.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Music & Morning Musume
bryan
47
7.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
Navigating Team Friction
lara
192
16k
GitHub's CSS Performance
jonrohan
1033
470k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
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