Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push notifications - updateSubscription ajax fires on every page load? #56

Open
ralphmorris opened this issue Jun 14, 2020 · 1 comment

Comments

@ralphmorris
Copy link

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

@bhulsman
Copy link

bhulsman commented Sep 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants