Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 1.01 KB

README.md

File metadata and controls

10 lines (6 loc) · 1.01 KB

offline-first-example

Basic offline first example intended for use on a static web app on iOS that includes HTML5 video.

Demo: After first page load, try refreshing the page without a network connection on any device including iPhone/iPad/iOS Safari/Chrome.

This example uses Webpack & Webpack Offline Plugin which uses Service Worker and Application Cache as a fallback.

The video is loaded via the (polyfilled) Fetch API as an Array Buffer because storing blobs in IndexedDB is not supported in iOS. Since we can't assign video sources to Array Buffers, we first convert it to blob.

This is intended to be a bare bones example. For more a (much) more advanced offline first example, take a look at Pokedex.org.