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
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
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
260
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
200
Cosmos World Foundation Model Platform for Physical AI
takmin
0
940
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
370
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
160
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
470
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
150
Agile Leadership Summit Keynote 2026
m_seki
1
650
Tebiki Engineering Team Deck
tebiki
0
24k
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
170
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
120
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Mobile First: as difficult as doing things right
swwweet
225
10k
First, design no harm
axbom
PRO
2
1.1k
Writing Fast Ruby
sferik
630
62k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
Paper Plane
katiecoart
PRO
0
46k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
67
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
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 に関しても意識を向けておく必要がある
ご清聴ありがとうございました