How to ensure a downloaded PWA uses the latest version

Question: What are the best practices for updating a PWA so users have the correct version on their phones?

Answer: Have users fully close and relaunch the PWA. On launch, the app fetches a version identifier and compares it with the current version; if the installed version is outdated, it forces a reload. This refreshes the app similarly to a browser update and applies the latest changes.


Original Slack Thread

User URTFUJ1TP: Any docs or guides on best practices for updating a PWA? Related to how to ensure a user has the correct version in their downloaded PWA on their phone.
User UBBJX2EHM: The main think is to fully close the app. On launch the basecode fetches a version and compares that, if old forces a reload.
User UBBJX2EHM: What are you finding
User URTFUJ1TP: That's incredibly easy to manage! It did load on my end - refreshed much like it would in a browser with a change, then immediately reflected the updates.