Skip to content

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

@ralphmorris

Description

@ralphmorris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions