UNPKG

@typed/content-hash

Version:

Content hash a directory of HTML/JS/CSS files and other static assets

14 lines (12 loc) 301 B
/* eslint-disable no-undef */ self.addEventListener('fetch', function (event) { event.respondWith( caches.match(event.request).then(function (response) { // Cache hit - return response if (response) { return response } return fetch(event.request) }), ) })