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

  • Home
  • SEARCH
  • 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 550321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:16:34+00:00 2026-05-13T11:16:34+00:00

I have to program websites, but I rather don’t like the static HTML nature.

  • 0

I have to program websites, but I rather don’t like the static HTML nature. I prefer more of a client-server architecture.

Now I’ve figured, that with XMLhttp, you can basically dynamically update your page and send/request for information/action to/from a server. So this would basically cover the client area.

But to complete a client-server architecture, it is necessary for the server to send/request information, too, without being queried.

Is there any way, for example for a chat server, to send back a received message to all clients (the clients use a web browser) without that the clients have to query in a fixed interval? I want to implement that one can see while you type something in.

  • 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-13T11:16:34+00:00Added an answer on May 13, 2026 at 11:16 am

    There are several different ways to accomplish this. Some of them are already answered here, but I wanted to include a few more as well as my thoughts on them.

    1. Polling

    Frequent requests are made to the server to check for new info. This is the worst way to do this, but probably the easiest. If your site will have a low number of users, it might be worth doing it this way.

    This can be accomplished by using setInterval(myFunction, n) in javascript to send XMLHttpRequests to the server every n milliseconds. Then, on the server, you respond to this with your new info, when you have it, or some message that implies no new info.

    2. Long Polling

    When the page is loaded, it makes a request to the server for new info. The server holds the connection open until there is something to send back. This method reduces the amount of network traffic used, but increases the resources used on the server. You can use this for a small number of users, but it doesn’t scale very well.

    The easiest way to do this is to have the page that handles the AJAX request simply wait for new information to be available, then respond. This can tie up a lot connections on your server. So, use with care.

    3. COMET

    COMET is basically long polling, but the server is setup properly for it. It knows that these connections aren’t “real” and it uses less resources to handle them. This is a great solution for this problem, but it requires that the server is explicitly setup for this purpose. There are COMET servers and COMET addins for other popular servers, but it will require some setup and sometimes some money.

    Implementing this on .NET isn’t the easiest thing in the world. You can pay for solutions, try to find someone else’s code that does something similar, or try to write it yourself. I’ve not found any decent free solutions for this. If someone else has, please comment.

    4. RIA

    Another solution would be to include Flash, Silverlight, or Java Applet on your page. People often do this by using a 1×1 object so that they can use Flash or Silverlight to talk to the server. If you don’t mind adding the dependency, this is a decent solution. If you already know Silverlight or Flash, it could be relatively simple to implement.

    You can find tutorials on the internet for each of these options.

    5. Web Sockets

    If you are on the cutting edge, you can look into Web Sockets. It’s only available in the latest builds of modern browsers. It was part of HTML5, but it might be its own spec now. Regardless, it means that older browsers won’t be able to handle it. But, if you don’t mind limiting yourself to the latest of browsers, you can use this amazing feature.

    I believe that Chromium is the only browser that currently supports it. However, there is work being done to implement this in Firefox and WebKit.

    I’ll spare you the controversy and simply say that this does exactly what you want it to. The Abstract of the spec says it all.

    This specification defines an API that enables Web pages to use the Web Sockets protocol for two-way communication with a remote host.

    Special Mention

    If you are interested in the world of Node JS, you can’t go wrong with Socket IO. It will implement the best of whichever technology is available to the browser.

    Conclusion

    The best option is Socket.IO on Node JS. However, for an ASP.Net solution, go for COMET or Web Sockets, if you can. Otherwise, using Flash/Silverlight isn’t terrible. Finally, polling and long polling should be last resorts. You could always support one of these, then fall back to another if there isn’t support for it in the client’s browser.

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

Sidebar

Ask A Question

Stats

  • Questions 279k
  • Answers 279k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you want to find the space of each table… May 13, 2026 at 3:28 pm
  • Editorial Team
    Editorial Team added an answer Take a look at the UITabBarController documentation. Search for "customizableViewControllers"… May 13, 2026 at 3:28 pm
  • Editorial Team
    Editorial Team added an answer The NSUserDefaults object stores its data in memory, and is… May 13, 2026 at 3:28 pm

Related Questions

I'm trying to download and parse the HTML of a web page. Recently, the
I've been developing websites for a few years now, and I've never had the
I've got a small program that displays third-party generated HTML pages. It's really just
I currently am a student worker at a medium sized university. i work for
I have a normal SLN file, and I'm compiling it fine with msbuild from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.