A 16kb Preact & Redux based Progressive Web App that offers an offline gallery experience of external images.
This application uses the Service Worker API which allows the user to have control the cache.
This application shows how postMessage() can be used to let the client communicate with the Service Worker to load assets, place them in the cache and display them instantly afterwards.
After loading an external asset it's available offline and can also be removed from the cache.
To keep performance high and application size small this application is powered by Preact. A 3kb React alternative that works with the same ES6 API. Together with Redux for keeping state it's really fast.
Preact based components manage controls of the user to add and remove images.
Redux is used to store the state of the application (images, UI state and network based elements).
UI is adjusted based on state (opening modal and showing buttons).
The application works offline, can be saved to the home screen (on android) and stores all the saved images in local storage and the cache.