Skip to content

persianturtle/offline-first-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published