The Service-Worker.js seems a bigger problem, because this file caching also the regular homepage, aside from our WordPress Caching Plugin (wp rocket).
Once the file is running, the Desktop Homepage (and mobile browser) does not reload a newer version, not even, if i renew the cache from admin panel.
Hi, WP Rocket support rep here. 👋
As for a little context: WP Rocket provides static HTML page caching. It is a paid plugin hosted on its own website, not on the wordpress.org repo. So any questions about WP Rocket itself should be discussed with our support team directly rather than on these forums.
@nico_martin Feel free to get in touch with us directly. If there’s any need to test with our plugin, we’ll gladly collaborate!
Hi there, sorry for the late respobse. I was very busy the last days working on the push notifications feature.
I looked at the issue. But I dont fully understand it. Progressive WP creates a client side caching, while WP Rocket adds a server side caching. So there should not be any incompatibility issue. Then, Progressive WP works as “network first”. That means if you’re online, the PWA cache (storage) will not be used, but it will automatically get the most recent version online (the one cached by wp rocket).
So if theres any cache invalidation, I think you should ask @glueckpress. But if you have more detailed information I’d be glad to help.
- This reply was modified 4 years, 9 months ago by Nico Martin.
i tried different pwa apps and all have the same problem. One has solved this problem, but another appears.
Once the plugin is active, the normal browser (chrome, firefox etc) don´t updating the startpage anymore until you deleting alle browser data (history, cookies etc.).
I take a look at the service-worker file from welt.de and they using cache expire rules as you can see here:
maybe this helps 🙂
So this also happens if you disable WP Rocket?
And does this only happen if you open it via the Desktop Icon or as well using the browser (navigating via URL)?
It´s happen in every case and every browser (Mobile and Desktop).. i am not a developer, but i think it has something to do with the cache rules in the service-worker that is located in the root directory that will grab by the browser first and then saved by them.
As example: if the plugin active, the admin bar will also disapear, because the browser loads a cached version with older content, although i am logged in as admin.
Nothing helps, neither with deactived wp cache, until all browser data will be deleted and cleared.
Well, as I said: Progressive WP works “network first”. So if you are online, the cached version won’t even be touched. I also added cache versioning right from the beginning.
But I have an assumption: you said you were trying multiple PWA plugins. I guess they all use Serviceworke. And since a Serviceworker, if registered once, stays inside your browser until you actively deregister them, I assume there are still multiple old ServiceWorkers from already deactivated plugins registered and one of them might serve all the outdated page. Could you remove ALL serviceworkers and try it again? (Dev Tools > Application > Serviceworker > there you’ll find all registered serviceworkers)
This is exactly what i have done, all files removed from the server. I checked this later again and writing then. Thanks a lot 🙂
Not sure if removing from the server is enough. You should remove/deregister them from the browser.
- The topic ‘Cache on PWA Start’ is closed to new replies.