full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

55
public/sw.js Normal file
View File

@@ -0,0 +1,55 @@
const CACHE_NAME = 'tiber365-v1';
const urlsToCache = [
'/',
'/en/',
'/nl/',
'/de/',
'/fr/',
'/en/about',
'/nl/about',
'/de/about',
'/fr/about',
'/en/contact',
'/nl/contact',
'/de/contact',
'/fr/contact',
'/services',
'/blog',
'/favicon.svg',
'/manifest.json',
'/images/TIBER365.png'
];
// Install event
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => cache.addAll(urlsToCache))
);
});
// Fetch event
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then((response) => {
// Return cached version or fetch from network
return response || fetch(event.request);
})
);
});
// Activate event
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((cacheNames) => {
return Promise.all(
cacheNames.map((cacheName) => {
if (cacheName !== CACHE_NAME) {
return caches.delete(cacheName);
}
})
);
})
);
});