Initial commit
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "Game Timer PWA",
|
||||
"short_name": "Game Timer",
|
||||
"name": "Game Timer",
|
||||
"short_name": "Timer",
|
||||
"description": "Multi-player chess-like timer with carousel navigation",
|
||||
"start_url": "/index.html",
|
||||
"start_url": "/",
|
||||
"id": "/index.html",
|
||||
"display": "standalone",
|
||||
"display_override": ["window-controls-overlay", "standalone", "minimal-ui"],
|
||||
"background_color": "#f5f5f5",
|
||||
"theme_color": "#2c3e50",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/android-chrome-192x192.png",
|
||||
|
||||
9
sw.js
9
sw.js
@@ -70,6 +70,15 @@ self.addEventListener('activate', event => {
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
console.log('[ServiceWorker] Fetch');
|
||||
event.respondWith(
|
||||
caches.match(event.request).then((cachedResponse) => {
|
||||
return cachedResponse || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
// Helper function to determine if a response should be cached
|
||||
function shouldCacheResponse(request, response) {
|
||||
// Only cache GET requests
|
||||
|
||||
Reference in New Issue
Block a user