Best way to send messages from server to client app

Usually, apps communicate to the server by sending HTTP requests. It sends some data and receives a response in return. While building my application I encountered a situation wherein the server had to send some message to the application (webapp) when an event occurs. I learnt about webpush APIs but, for webpush APIs to work properly, the user must grant notification permissions, which he may or may not. So, I want to avoid relying on the user for permission and instead was looking for any other reliable alternatives I can use?

Posted Dec 1, 2019, 1:19 PM UTC

23
Loading comments…