Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

auto refresh vue pwa

forceSWupdate () {
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.getRegistrations().then(function (registrations) {
      for (let registration of registrations) {
        registration.update()
      }
    })
  }
}
Source by forum.quasar-framework.org #
 
PREVIOUS NEXT
Tagged: #auto #refresh #vue #pwa
ADD COMMENT
Topic
Name
5+4 =