DEV Community

Discussion on: The thing about service workers...

Collapse
 
leob profile image
leob • Edited

Great points, that sounds like an instance of "have your cake but not be able to eat it" ... I don't have real hands-on experience with this kind of stuff, but it sounds like you really have to force your users to upgrade, at least in case of "major" upgrades, I think there are also native apps which do that:

"Sorry, but your app version is incompatible with our services, please click HERE to upgrade ..."

So, on app startup, but also at strategic places after that, I'd do a version check "is this frontend app compatible with the current backend API" and then show a link or button which they have to click to upgrade. Make it mandatory only for "major" upgrades.

Collapse
 
sebastijandumancic profile image
Sebastijan Dumancic

That's a good point, I wanted to touch on that but forgot. Updated in the article, thanks :)

Issue is that you HAVE to have event that check 100% done right in the first version that hits the web, otherwise you risk caching users to the version without the check. That's the issue actually - when you release a major upgrade, you are not sure that everyone is seeing this upgraded app when they are opening the app for the first time after some time.

Collapse
 
leob profile image
leob

Haha that's absolutely right, that check has to be there and working perfectly in version 1.0 of your app ... I think this should be mentioned in EVERY article or tutorial that touts the benefits of PWAs. And you're right that an "old fashioned" web site (not a 'PWA' or an 'app') doesn't have these issues!