feat: add asset caching (sw)

This commit is contained in:
Sonny
2025-01-03 01:59:42 +01:00
parent e2494e8cf0
commit e28d5ebea8
22 changed files with 3163 additions and 121 deletions

View File

@@ -19,7 +19,7 @@
/>
<link
rel='manifest'
href='/manifest.json'
href='/assets/manifest.webmanifest'
/>
<link
rel='apple-touch-icon'
@@ -30,6 +30,13 @@
href='/favicon.png'
/>
<title inertia>MyLinks</title>
<script defer>
if('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/assets/sw.js', { scope: '/' })
})
}
</script>
@routes()
@inertiaHead()