Add service worker with workbox: asset/image/font cache, offline fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-20 21:01:56 +01:00
parent dee2d18438
commit a9e98faf39

View File

@@ -41,6 +41,19 @@ pwa:
short_name: Contact
url: /contact
description: Nous contacter
serviceworker:
src: "sw.js"
workbox:
asset_cache:
enabled: true
regex: '/\.(css|js|json|xml|txt|map|ico|png|jpe?g|gif|svg|webp|bmp)$/'
max_entries: 60
image_cache:
enabled: true
font_cache:
enabled: true
offline_fallback:
page: 'app_offline_page'
favicons:
enabled: true
default: