We help IT Professionals succeed at work.

AJAX & closing/re-using open connections using XMLHTTPRequest

Last Modified: 2008-01-09

I use the XMLHTTPRequest & responsetext to simulate a server push for a data grid on my html page.

With only one client browser connected, if i run netstat -a i can see hundreds of connections in a state of "TIME-WAIT" and about 15 connections in state "ESTABLISHED"

The server performance is not affected by these connections never getting closed, but i doubt they're doing any good.

Can they be closed with client side javascript code? Or better still, how do i get XMLHTTPRequest to stop opening a new connection every time and re-use the existing connection?

Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


hi isisagate,

thanks for the reply, i've run the same code on an XP box and there are no where near the same amount of open ports as on the 2000 box.

As you suggest, there's something wrong on the back end however I'm reluctant to mess with it as i'm not seeing any problems/performance issues. "if it's not broke, don't fix it!"

Any ideas what settings i sould be looking for?

thanks for your time,
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.