Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Take care to invalidate Client Side Storage
Search
shinichi.kogai
September 30, 2019
Technology
260
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Take care to invalidate Client Side Storage
shinichi.kogai
September 30, 2019
Other Decks in Technology
See All in Technology
Optunaの最新リリースv5.0について
pfn
PRO
0
120
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
継続的なAIコスト最適化
bgpat
1
340
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
今さら理解するウェブフォントver.2026
takanorip
3
770
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
430
パッチ更新でterraform initが落ちた日
grimoh
1
140
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
Refining Active Record
shugo
0
150
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Tell your own story through comics
letsgokoyo
1
1.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Navigating Team Friction
lara
192
16k
Google's AI Overviews - The New Search
badams
0
1.6k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
820
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
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 に関しても意識を向けておく必要がある
ご清聴ありがとうございました