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 8039945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:44:17+00:00 2026-06-05T03:44:17+00:00

Ok, I am working up something like a chat environment, and I’d like to

  • 0

Ok, I am working up something like a chat environment, and I’d like to have near real time if not real time conversation. But I know browsers will only give up 2 threads at a time for transactions per domain. So I am trying to figure out a way to make a synchronous chat without really effecting the browser. I also know browsers tend to lock up with synchronous requests.

So whats the best approach at creating a chat like environment on a site from scratch, assume the DB and scripting concept is fine, its the managing of the connection, wondering how to keep a persistant connection that won’t congest the browser and cause it to possibly freeze up.

Anyone have any ideas.. Im not looking for flash, or java based solutions. I’d prefer not to poll every second either. But what is stacks impression, what would you do.

  • 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-06-05T03:44:18+00:00Added an answer on June 5, 2026 at 3:44 am

    First off, the spec only suggests that two connections are allowed. Most modern browsers actually support up to 6.

    There’re three main accepted methods for creating a chat system out of pure Javascript:

    Polling

    The first solution is simple, and just involves polling the server every few seconds (5 is a nice number) to see what it’s missed. It works simply and efficiently, but can lead to large amounts of unnecessary requests if not careful, which can cause unnecessary server load.

    A better implementation of this involves polling to simply check if anything’s happened since the last chat update, and if so, only then go through the process of finding out what’s happened. Saves on the server load and bandwidth fronts.

    Waiting

    This method’s more commonly used, and involves the browser sending a request to the server which is never fulfilled, and instead keeps ‘waiting for a response’. When something happens, the server outputs it and fulfills the request, and the client makes another request and the process repeats. This saves on the request front, but can end up with a backlog of ongoing processes on your server.

    Websockets

    https://developer.mozilla.org/en/WebSockets

    This involves creating a direct socket connection to the server, allowing data to be pushed to the client when needed. It’s relatively new though, and can have some compatability issues, especially with older browsers.

    Out of these, none of them is specifically the ‘best method’; it depends on what you’re aiming for, and what matters. If you’ve got a site designed for up-to-date browsers, then websockets could be your answer, but if you’ve got a small-ish server, then polling could be better, for example.

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

Sidebar

Related Questions

I have the a simple LinqToSQL statement that is not working. Something Like this:
I'm working on configuring a RollingFileAppender in log4net programmatically. I have something like this
want to rewrite urls like site.com/software to wp-content/themes/dir/software.php and something is not working.. Here's
I'm working with something like this: http://jsfiddle.net/Hh2Ht/ As you can see, I have a
The code I'm working with looks something like this: <% MessageInfo msg= hp.getInfo(transactionName, checkpointLoc);%>
I am working on a Bash shell script that does something like this: #!/bin/bash
I'm working on a JSON API and I want to do something like Facebook's
I'm working on a game bot. I'd like to place there something like a
Am working in VC++ 2008 (express) and I would like to write something in
So I'm working on something in obj-c (I'd rather not say what) where I

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.