DEV Community

Discussion: What is the best way to get users to refresh a web app?

marcellothearcane on September 10, 2019

I'm currently developing a Nuxt web app for our staff to use for processing orders. At the moment, there are a lot of bugs being fixed or new fea...
Collapse
 
sergiodxa profile image
Sergio Daniel Xalambrí

What Next does and probably Nuxt can do if it’s not default is create a BUILD_ID, if such ID changed when the user tried to access another page then it’s hard reloaded. Maybe you could do something similar?

Collapse
 
tobiassn profile image
Tobias SN

Once every 5 minutes or something, the client should request the newest version number from the server. If it’s different from the one it’s currently running, it should show a popup in the corner telling the user that there’s a new version and that they should refresh.

Collapse
 
skryking profile image
Jason Ormes

Do something to cause their browser to crash...

Collapse
 
marcellothearcane profile image
marcellothearcane

Hah. It does that already - these are the bug fixes!

Collapse
 
brettm12345 profile image
Brett Mandler

You could create an event listener to trigger a popup when a service worker finds an update. Take a look at developers.google.com/web/fundamen...