xmlHTTPRequest responseText with readyState==3

Skip to first unread message

Jim Kunz

Sep 28, 2007, 10:33:13 AM9/28/07
I am using an xmlHTTPRequest from the browser to my servlet as a way to send
javascripts from the servlet to be executed on the client.

I am trying to keep the connection from the servlet to the client alive as
long as possible, so I am not completing the xmlHTTPRequest from the server
side and the xmlHTTPRequest stays open and once in readyState==3, I can see
& execute the scripts the servlet is sending down.

But, all the script texts the servlet sends keep accumulating in the
responseText and the responseText keeps growing and growing in length and I
am wondering if

(1) if there is a way to clear out the responseText without having to
complete the request so that the responseText does not keep growing and

And if not then

(2) if there is an upper limit on how many characters the responseText can
hold or that javascript can process so I can avoid having my client
javascript code blow up because there's too many characters in the

Reply all
Reply to author
0 new messages