Commit Graph

4 Commits

Author SHA1 Message Date
Paolo Arena
f52eb65284 - regular expression for precache
new RegExp(/.*\/(?:css|font).*/),
2019-01-31 17:08:10 +01:00
Paolo Arena
fa7247a338 - Activated Workbox precache PWA !
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');

  if (!workbox) {
    workbox = new self.WorkboxSW();
  }

  if (workbox) {
    workbox.core.setCacheNameDetails({prefix: "freeplanet"});

    /**
     * The workboxSW.precacheAndRoute() method efficiently caches and responds to
     * requests for URLs in the manifest.
     * See https://goo.gl/S9QRab
     */
    self.__precacheManifest = [].concat(self.__precacheManifest || []);
    workbox.precaching.suppressWarnings();
    workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

    workbox.routing.registerRoute(/^http/, workbox.strategies.networkFirst(), 'GET');

  }
2019-01-31 13:52:52 +01:00
paolo
ab8e4327f0 Creating GitHub project FreePlanet 2018-12-10 11:38:22 +01:00
paolo
a2673c0502 Primo Committ 2018-10-12 16:42:54 +02:00