Postagens

Mostrando postagens de fevereiro, 2018

Offline Storage for Progressive Web Apps

Imagem
Offline Storage for Progressive Web Apps The Pokedex.org Progressive Web App uses IndexedDB for application state and the Pokemon data set while the Cache API is used for URL addressable resources. 2016 will hopefully be the year we build for  network resilience . Internet connections can be  flakey  or non-existent on the go, which is why offline support and reliable performance are common features in  Progressive Web Apps . In this post, I’ll summarize some ideas around  offline data storage   for PWAs — think the JSON payloads, images and general static data required to provide a  meaningful  experience offline. A recommendation for storing data offline: For  URL addressable resources , use the  Cache API  (part of  Service Worker ). For all other data, use  IndexedDB  (with a  Promises  wrapper). Some quick answers to common questions on why: Both APIs are asynchr...