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
Take care to invalidate Client Side Storage
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
shinichi.kogai
September 30, 2019
Technology
1
240
Take care to invalidate Client Side Storage
shinichi.kogai
September 30, 2019
Tweet
Share
Other Decks in Technology
See All in Technology
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
0
100
プロポーザルに込める段取り八分
shoheimitani
1
470
OpenShiftでllm-dを動かそう!
jpishikawa
0
130
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
220
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
170
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
220
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
20260204_Midosuji_Tech
takuyay0ne
1
160
Context Engineeringの取り組み
nutslove
0
360
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
Agile Leadership Summit Keynote 2026
m_seki
1
650
Cosmos World Foundation Model Platform for Physical AI
takmin
0
940
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
Ruling the World: When Life Gets Gamed
codingconduct
0
140
BBQ
matthewcrist
89
10k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Code Reviewing Like a Champion
maltzj
527
40k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
30 Presentation Tips
portentint
PRO
1
220
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
How to Talk to Developers About Accessibility
jct
2
130
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Transcript
Take care to invalidate Client Side Storage
自己紹介 • フロントエンドエンジニア(元デザイナー) • Feedforce Inc. 所属 • ECサイト運営支援SaaS •
言語処理系・型システムに興味あり GitHub: kogai Twitter: iamchawan Hatena: kogainotdan
今日話すこと • All app URLs load while offline • First
load fast even on 3G PWAの構成要件としてのClient Side Storage https://developers.google.com/web/progressive-web-apps/checklist 良さそう、でもちょっと待って
事例1 • Feedforceで運営している、とあるブログ(WordPress) • 「PWAモード」を提供するWPプラグインでオフラインモード・低遅 延なコンテンツ配信を導入 • WordPressサーバが生成したHTMLをServiceWorkerで CacheStorageに保存 •
オフライン時はCacheStorageからコンテンツを取得 • サーバ側でコンテンツに更新があれば、新しいServiceWorkerファ イルが生成されて、unregister/registerした上でキャッシュを更新 オフラインでも読めるブログ
事例1 • ServiceWorkerとCacheStorageを使っていることを認識していな いことで、「ブログを更新してもしばらく最新のコンテンツが反映さ れない」という問題が生じていた(ServiceWorkerのライフサイク ルを把握していなかった) • 「PWAモード」を停止すると、ServiceWorkerファイルの再生成が 行われなくなるので、unregister/registerもされなくなる •
「PWAモード」停止前のコンテンツが残り続けることになり、ブロ グ読者から見てコンテンツが更新されないようになる 問題点
事例2 • React-Reduxを使ったSPA • redux-persistというライブラリでLocalStorageにStoreを永続化 • 次回起動時に状態を引き継ぐ • 入力途中で離れたユーザに、CSが接触した時に直前の状態から再開 出来る
Storeをローカルに保存するアプリケーション
事例2 • StoreのShapeを変えると意図しな い動作をし得る • 型上は安全 • クライアント側アプリケーションの バージョニングの仕組みなどで、破 壊的変更をケアする必要がある
問題点
まとめ • Client Side StorageによるUXの向上は魅力的 • 但しClient Side Storageは本質的にサイト・アプリケー ションの運営者側に操作権のないストレージ
• Create/Readに関する記事は豊富だが、Update/Delete に関しても意識を向けておく必要がある
ご清聴ありがとうございました