Update service-worker.js

This commit is contained in:
FURK4NGG
2024-09-11 17:11:44 +03:00
committed by GitHub
parent 1b75ef2cf7
commit 0216294288
+4 -5
View File
@@ -1,10 +1,9 @@
const CACHE_VERSION = 'v2'; // Update this version number to trigger cache refresh const CACHE_NAME = 'my-site-cache-v8';
const CACHE_NAME = `My-Site-Cache-${CACHE_VERSION}`;
let urlsToCache = [ let urlsToCache = [
'/', '/',
'/index.html', '/index.html',
'/not_found_page.html', '/not_found_page.html',
'/not_found_page.html',
'/service-worker.js', '/service-worker.js',
'/img/ai.webp', '/img/ai.webp',
'/img/app.webp', '/img/app.webp',
@@ -27,7 +26,7 @@ const userLang = navigator.language || navigator.userLanguage;
// Eğer tarayıcı dili Türkçe ise /tr klasöründeki dosyaları ekle // Eğer tarayıcı dili Türkçe ise /tr klasöründeki dosyaları ekle
if (userLang.startsWith('tr')) { if (userLang.startsWith('tr')) {
urlsToCache = urlsToCache.concat([ urlsToCache = urlsToCache.concat([
'/home_tr.html', '/hometr.html?v=3',
'/CSS/tr/1.css', '/CSS/tr/1.css',
'/CSS/tr/2.css', '/CSS/tr/2.css',
'/JAVASCRIPT/tr/1.js' '/JAVASCRIPT/tr/1.js'
@@ -35,7 +34,7 @@ if (userLang.startsWith('tr')) {
} else { } else {
// İngilizce dosyaları ekle // İngilizce dosyaları ekle
urlsToCache = urlsToCache.concat([ urlsToCache = urlsToCache.concat([
'/home_en.html', '/home.html?v=3',
'/CSS/1.css', '/CSS/1.css',
'/CSS/2.css', '/CSS/2.css',
'/JAVASCRIPT/1.js' '/JAVASCRIPT/1.js'