diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-23 17:09:43 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-23 17:09:43 +0300 |
| commit | a39d07a68a6ead602524a1a928aaf3a0f7d548a0 (patch) | |
| tree | b34195f63f3656db30294e5a8b8d88822846715a /web/assets/js | |
| parent | 81c9b4450bce3726733438fc860a2f7d4c242ea9 (diff) | |
revert #1678
i got so many errors while testing it on my server
and i think we can have security issue if use this
anyway thank you and sorry about this
Diffstat (limited to 'web/assets/js')
| -rw-r--r-- | web/assets/js/sw.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/web/assets/js/sw.js b/web/assets/js/sw.js deleted file mode 100644 index 46cf61c4..00000000 --- a/web/assets/js/sw.js +++ /dev/null @@ -1,39 +0,0 @@ -var self = this; - -var filesToCache = [ - '/' -]; - -self.addEventListener('install', function (e) { - e.waitUntil( - caches.open('3xPanel').then(function (cache) { - return cache.addAll(filesToCache); - }) - ); -}); -self.addEventListener('activate', function (event) { - event.waitUntil( - caches.keys().then(function (cacheNames) { - return Promise.all( - cacheNames.filter(function (cacheName) { - }).map(function (cacheName) { - return caches.delete(cacheName); - }) - ); - }) - ); -}); -self.addEventListener('fetch', function (event) { - event.respondWith( - caches.open('mysite-dynamic').then(function (cache) { - return cache.match(event.request).then(function (response) { - return response || fetch(event.request).then(function (response) { - cache.put(event.request, response.clone()); - return response; - }); - }); - }) - ); -}); - -console.clear();
\ No newline at end of file |
