PHP Classes

File: app/serviceWorker.js

Recommend this page to a friend!
  Classes of Okanlawon Anuoluwapo   PHP MongoDB CRUD Example of API   app/serviceWorker.js   Download  
File: app/serviceWorker.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP MongoDB CRUD Example of API
API that provides CRUD operations with MongoDB
Author: By
Last change:
Date: 8 months ago
Size: 472 bytes
 

Contents

Class file image Download
const staticDevCoffee = "pwa-rest-site-v1"; const assets = ["index.html", "css/style.css", "js/app.js"]; self.addEventListener("install", (installEvent) => { installEvent.waitUntil( caches.open(staticDevCoffee).then((cache) => { cache.addAll(assets); }) ); }); self.addEventListener("fetch", (fetchEvent) => { fetchEvent.respondWith( caches.match(fetchEvent.request).then((res) => { return res || fetch(fetchEvent.request); }) ); });