When using web versions of chat apps such as WhatsApp, Skype, or Telegram I allow them to send me desktop notifications, which they use for new messages. But it seems that this allows for those sites to then continue to send me push notifications even when I close them, using something called Service Workers. Meaning that every time after that when I open my browser with zero pages, I'll get a flood of messages that have been sent to me in the meantime.
I've only found ways to disallow them to use desktop notifications altogether. Which is not what I want, notifications are okay. But what I want is to only disallow the notifications if I'm not currently using them (have their site open).
I am currently using Firefox, but I would appreciate knowing if other browsers can control this as well.