I have been using setInterval(function(), ms) everytime I am making a live notification feature in my website but is there any alternative way to make this live notification without sending request every 5 or 10 seconds, depends on what interval you set. Isn't it heavy to send post/get request everytime you need new datas?
Asked
Active
Viewed 473 times
1 Answers
0
yes it would take a lot of bandwidth. for solution: you can either use WebSocket
technology or the Long Polling
method ..
Click here for Long Polling
reference.
Click here for Web Socket
reference.

Demonyowh
- 1,673
- 1
- 9
- 14