DEV Community


Posted on

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

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 features implemented.

The trouble is, the users generally keep the tab open for days on end, since they are using it constantly - and since it's Nuxt, they don't ever hard-refresh.

This means they don't get the bug fixes they asked for as soon as they have been deployed.

What is the simplest notification system for me to quickly post a 'Refresh this page to see the latest version' popup?

I'm using Nuxt, GraphQL, and Zeit deployment, so if it could trigger from a successful deploy on Zeit that would be awesome.

Top comments (5)

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?

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.

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

skryking profile image
Jason Ormes

Do something to cause their browser to crash...

marcellothearcane profile image

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