-
Notifications
You must be signed in to change notification settings - Fork 3
Make Some Files Available Offline
tmpmachine edited this page Jul 13, 2021
·
3 revisions
Register file path that need to be available in offline mode in codetmp/sw.js
.
self.addEventListener('install', function(event) {
// files listed below will be cached for offline browsing
let urls = [
'/',
'/css/style.css',
'/assets/ace/ace.js',
'/assets/ace/theme-codetmp.js',
..
Don't forget to increase cacheVersion
. Keep in mind that it need to keep increasing, otherwise you will have to tell your users to clear their cache if something went wrong. Currently There's no meaning behind Codetmp version, this might change after v7.3.
let cacheVersion = '7.2782';