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
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
オープンウェイトのLLMリランカーを契約書で評価する / searchtechjp
sansan_randd
3
650
Tebiki Engineering Team Deck
tebiki
0
24k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.1k
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
410
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
120
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
170
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
190
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
560
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
1
270
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
130
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Deep Space Network (abreviated)
tonyrice
0
45
Everyday Curiosity
cassininazir
0
130
Mobile First: as difficult as doing things right
swwweet
225
10k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Information Architects: The Missing Link in Design Systems
soysaucechin
0
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