Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XmlHttprequest and perisistent connections

47 views
Skip to first unread message

Wilco

unread,
Nov 4, 2008, 8:09:23 AM11/4/08
to
I'm having trouble with an AJAX script which polls an XML file off a
webserver. Problem is that for every XMLHttpReqeust I make, a new TCP
connection is set up (which eats a lot of resources from my embedded
device). Is this normal behaviour?

The HTTP server supports HTTP 1.1, so I suppose it should use a
perisistent connection. I checked if the webserver was configured
properly, and it is.

I did some research on the subject and looked at the wireshark output
of a Mozilla firefox 3.0 quick search bar search (which also uses
XmlHttpRequest). The requests in this log are done via a single TCP
connection. I compared the source js to my own js but there where no
functional differences.

Also checked websites as http://ajaxref.com/ http://ajaxpatterns.org/
and http://radio.javaranch.com/pascarello/2006/03/30/1143735438047.html
but could not find any info.

Anyone got a clue?

Wilco

Tei

unread,
Nov 6, 2008, 11:41:33 AM11/6/08
to dev-...@lists.mozilla.org

if is not your code, maybe is your data... your URL parameter, like

http://www.mysite.com/foo/bar/caa/zeta
vs
?data=newdata&json=()

maybe the god's of software are mad at you for use the wrong type.

--
--
ℱin del ℳensaje.

Martin E

unread,
Nov 24, 2008, 10:50:35 AM11/24/08
to
"Wilco" <w.van...@gmail.com> wrote in message
news:fac80785-90f3-4d78...@i18g2000prf.googlegroups.com...

What I did in the past is opend a connection, wait for a response then close
the connection(delete the object).
This is much different than when it is run under IE. Firefox doesnt like to
make multiple requests.
My application was a remote appliance that used ajax to get display data. It
was a PIC running Mchips stack.
I used the default socket count.

Hope that helps.

Martin

0 new messages