mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
feat: add asset caching (sw)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user