Service worker - push notifications

Hello,

please I have problem with web push notifications. In my service worker there are two listeners notificationclick and notificationclose. But behaviour is strange. If customer clicks on notification, it’ll fire both of listeners and I cannot track them. I’d like to know if customer close/click notification.

Other problem is with pushsubscriptionchange. Subscription has some expiration time, but I havent found how much. So what is expiration time of subscription?

Please let me know.

Thank you, Frantisek