laravel-web-push-demo
laravel-web-push-demo copied to clipboard
Push notifications - updateSubscription ajax fires on every page load?
Hey,
Small question regarding the NotificationsDemo.vue file if that's ok?
I've been following the docs and the JS example and noticed that it is firing an ajax call to updateSubscription on every page load if the user already has a push notification subscription. See the below link:
https://github.com/cretueusebiu/laravel-web-push-demo/blob/master/resources/js/components/NotificationsDemo.vue
Is this required? It's working fine for me (locally) only storing the push notification subscription at the initial point the user confirms but I don't have to do all the subsequent ajax requests. Or does the endpoint/public_key/auth_token need updating from time to time?
Thanks in advance :)
I was wondering the same! Did you find out if the update is required so often?