Spomky-Labs / pwa-bundle

PHP library for generating a full featured PWA manifest
https://pwa.spomky-labs.com
MIT License
28 stars 1 forks source link

changes to pwa.yaml require manual cache clearning #145

Open tacman opened 2 months ago

tacman commented 2 months ago

Version(s) affected

1.1.x

Description

Changes to config/packages/pwa.yaml are not reflected when refreshing /sw.js unless the cache is manually cleared.

How to reproduce

go to /sw.js change a regex or something refresh /sw.js (no changes) refresh again (changes shown)

Possible Solution

I might be because sw.js is itself cached with a cacheFirst strategy, so the first time it's cached.

Additional Context

No response

Spomky commented 2 months ago

Normally, the service worker is not served by the cacheFirst rule. There is an option to enable/disable the browser cache:https://pwa.spomky-labs.com/the-service-worker/configuration#cache