These two methods defined by the Push API are used to get the push subscription from the browser. What is the difference between them?
When a user is visiting your website and subscribes to notifications, you get a push subscription, which must be stored somewhere (in a database) in order to send notifications to that user.
How can you verify that a push subscription is still valid (and not invalid or expired)? How can you detect if a user has unsubscribed and the subscription is no longer valid?
If you are implementing web push notifications on a website you should be familiar with the concept of endpoint.