Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Take care to invalidate Client Side Storage

Avatar for shinichi.kogai shinichi.kogai
September 30, 2019

Take care to invalidate Client Side Storage

Avatar for shinichi.kogai

shinichi.kogai

September 30, 2019
Tweet

Other Decks in Technology

Transcript

  1. 自己紹介 • フロントエンドエンジニア(元デザイナー) • Feedforce Inc. 所属 • ECサイト運営支援SaaS •

    言語処理系・型システムに興味あり GitHub: kogai Twitter: iamchawan Hatena: kogainotdan
  2. 今日話すこと • 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 良さそう、でもちょっと待って
  3. 事例1 • Feedforceで運営している、とあるブログ(WordPress) • 「PWAモード」を提供するWPプラグインでオフラインモード・低遅 延なコンテンツ配信を導入 • WordPressサーバが生成したHTMLをServiceWorkerで CacheStorageに保存 •

    オフライン時はCacheStorageからコンテンツを取得 • サーバ側でコンテンツに更新があれば、新しいServiceWorkerファ イルが生成されて、unregister/registerした上でキャッシュを更新 オフラインでも読めるブログ