laravel-web-push-demo icon indicating copy to clipboard operation
laravel-web-push-demo copied to clipboard

Push notifications - updateSubscription ajax fires on every page load?

Open ralphmorris opened this issue 5 years ago • 1 comments

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 :)

ralphmorris avatar Jun 14 '20 14:06 ralphmorris

I was wondering the same! Did you find out if the update is required so often?

bhulsman avatar Sep 08 '20 10:09 bhulsman