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:
2018-11-12 12:44:30 -05:00
parent ff965e94d5
commit c16e2f763d
4 changed files with 320 additions and 24 deletions

View File

@@ -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>