: Web Notification Design I am designing a website which my web user would interact on the site. Take FB poke function for example. There are two men A and B and they are both online. And
I am designing a website which my web user would interact on the site.
Take FB poke function for example. There are two men A and B and they are both online. And A poked B.
What I want to know is how to make B get an instant notification, knowing that A poked him just now ?
The way I thought is that make a javascript code to ajax the database for new notification every minutes. How could I reduce the amount of the times of query the data ?
Or is there any other way better?
More posts by @Lee4591628
1 Comments
Sorted by latest first Latest Oldest Best
You can use WebSockets, a very good library for it is Socket.io. Then you can emit an event serverside and the client gets it immediately.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.