Added Service Worker to Cache Assets for Offline
Added a service worker script to cache assets on local storage. In testing on desktop it worked. Need to test further on mobile.
This commit is contained in:
@@ -186,7 +186,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Checks is there is a service worker and adds or updates -->
|
||||
<!-- <script>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('sw.js')
|
||||
@@ -198,7 +198,7 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
</script> -->
|
||||
</script>
|
||||
<!-- <script src="js/vendor/modernizr-3.5.0.min.js"></script> -->
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user