Knowledge Base

¿Qué es esto?

Progressive web applications (PWA): Dónde se almacena la información Offline

21/12/2016 - 18/12/2018 -  Comentarios - Progressive web applications (PWA)

Debería hacerse en el serviceWorker.js, de una manera simillar a la siguiente:

var files = [

  './',

  './index.html',

  './index.html?utm=homescreen', //SW treats query string as new page

  './css/styles.css',

  'https://fonts.googleapis.com/css?family=Roboto:200,300,400,500,700', //caching 3rd party content

  './images/icons/android-chrome-192x192.png',

  './images/push-on.png',

  './images/push-off.png',

  './images/icons/favicon-16x16.png',

  './images/icons/favicon-32x32.png',

  './js/app.js',

  './js/offline.js',

  './js/push.js',

  './js/sync.js',

  './js/toast.js',

  './js/share.js',

  './js/menu.js',

  './manifest.json'

];

Luego en el proceso de instalación, se añadirían esos elementos a la caché del navegador.