chata application built in jquery - how to keep client & server connected
<p>i have built a jquery based text chat in asp.net..... the flow is as such...
User A logs in.... Now in the bottom of my page i have a iframe on which the jquery code is embedded.. the jquery will send request to server after every 5 seconds... on the server i have a web method that will check the if any user has sent a text message to user A (checks in database).. if found it will return it in json format and will be displayed in a div...
my problem is that is it a good idea to send request to server after every 5 seconds... suppose 1000s of users gets logged in.. jquery will send 1000s of request every 5 seconds... i am new i need your support</p>
