I am not sure if I understand it right. So if I make a new build on the server and user have old version open in the browser, this plugin will detect new version and automatically update refresh the page?
I am not able to test it on localhost cause it refresh the page automatically. Is it possble to test it on localhost? If I add this lines at the beginning of the plugin
Yes, once the new version is published on the server, when a user loads your website it will reload automatically without the users needing to click the reload button, or implementing a update button on your website.
As far as I know, workers don't execute on localhost, so you cant test it.
@alejandroakbal What do you mean by 'when a user loads your website'? I thought that the use case for this is that the site is already loaded and in the background the code realises that a newer version is available and forces the browser to refresh.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am not sure if I understand it right. So if I make a new build on the server and user have old version open in the browser, this plugin will detect new version and automatically update refresh the page?
I am not able to test it on localhost cause it refresh the page automatically. Is it possble to test it on localhost? If I add this lines at the beginning of the plugin
else {
console.log('Workbox has been loaded.');
}
I dont see any log in console.
Yes, once the new version is published on the server, when a user loads your website it will reload automatically without the users needing to click the reload button, or implementing a update button on your website.
As far as I know, workers don't execute on localhost, so you cant test it.
@alejandroakbal What do you mean by 'when a user loads your website'? I thought that the use case for this is that the site is already loaded and in the background the code realises that a newer version is available and forces the browser to refresh.