2) is a cache
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>
service-worker.js
var CACHE_VERSION = '0.1.1'; //Update Version
No comments:
Post a Comment