PWA doesnt seem to update properly

I have @PWA on my app, and I get nicely prompted to install my site as an app on my phone. But when I update the site, the installed app doesnt get updated. I need to uninstall and reinstall to get the new code to my phone.

Is there a setting I am missing, or have I perhaps fkd up my PWA somehow? Should it work?

I run Vaadin 24.4.4, but no Vaadin-code, just Hilla and Endpoints.

Sounds to me like something that should work, assuming the phone is not in offline mode. Can you reproduce the behavior in a basic starter app? If so, I would recommend creating a ticket here: GitHub - vaadin/hilla: Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.

Ok, then it is me that has messed things up. I’ll add a ticket to myself to fix when there is time. Hopefully not too many users uses the PWA-functionality yet haha.

I recently updated a Hilla/PWA test project to the latest stable Vaadin version (24.5.8) and I had no problems with stale or missing updates when testing the PWA on an iOS device. Maybe you could take a look at the code to compare it with your approach: GitHub - rbrki07/vaadin-create-countdown: Simple demo app build with Hilla..

Thank you René! I will study this thoroughly. I am leaning to a CDN-problem on sw.js. But your code will help me see if I do stupid things.