1.0.0 • Published 5 years ago
@appsaloon/pwa-check-update v1.0.0
Usage
- import
- then call with a callback
- callback will be called whenever there is a new version available on the server
import pwaCheckUpdate from '@appsaloon/pwa-check-update'
pwaCheckUpdate({
onUpdateIsAvailable () {
window.alert('There is a new version available')
}
})
This package uses etag
to compare versions. You'll have to add this to your server.
If you're using serve
:
The serve
package has this feature built in, you should verify to make sure your config is correct.
This package uses the index file /
to compare versions: fetch('/', { method: 'HEAD' })
1.0.0
5 years ago