Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 630027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:48:40+00:00 2026-05-13T19:48:40+00:00

I have to implement gmail style chatting in my asp.net website. now i know

  • 0

I have to implement gmail style chatting in my asp.net website. now i know much has been said in this regard here and other forums…about COMET and its befits….

i recently saw this site http://www.indyarocks.com and when i profiled their website i found out that for chatting they send a async request and the page waits until the server has some data to return and only after the page returns….(i mean it shows status 200 OK) and again a request is dispatched.

i have implemeted chat in my website in which i poll the database after 5 sec for any new chat…so i want to know if i send a request using ASP.NET AJAX to a web method and keep on looping on the server until it has some data to return and then return to the webpage that called it is it a good approach and if not what are its demerits????

the code that i can use

<WebMethod(EnableSession:=True)> _
    Public Function looper(ByVal x As String) As String
        Dim flag As Boolean = False
        While (flag = False)
            Dim ans As String = getScalar("select 1 from Chat where sent_by=1")
            If Not ans Is Nothing Then
                flag = True
            End If
        End While
        Return "x"
    End Function

here i can loop over the server until it has some data

in any case is it better than the polling approach????

Does anyone have suggestions to improve this approach???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:48:41+00:00Added an answer on May 13, 2026 at 7:48 pm

    Its better than polling approach from client side

    Why, because

    • It avoids server roundtrip – saves lot of time
    • And avoid unnessary calls to server (Polling approach calls the webmethod even though the data is not available)

    In other hand, your current COMET approach, Server calls are minimal from javascript because the new request only be made from client if the server return the updated data.

    So keep up with the current design

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.