vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.21k stars 209 forks source link

disable register's all entries #752

Open abdo-spices opened 2 months ago

abdo-spices commented 2 months ago

in sw all entries are saved i don't this what if i have 1000 page as docs i want to just cashe what's is already downloaded

min reproduction https://github.com/abdo-spices/pwa-min-prod

userquin commented 2 months ago

If we want to cache only visited pages you need to use runtime caching with network first. You also need to disable injection point.

Your app Will not work when offline when the user visit a page missing in the cache.

You will need to use a custom sw to create the caches, workbox wont be able to create the cache and add the assets to the cache on first visit.

abdo-spices commented 2 months ago

refence pls