469,902 Members | 1,805 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

how to close the connection when the response has been send from server side to ajax

i dont know in which forum to post it in as it has both servlets and javascript in it

i have made an ajax request to server side to read the values of a cookie and then send these values to javascript file and then close the connection

ive done the part of sending and receiving but i dont know how to close the connection after that
what code should i write in javascript or servlet to close the connection
i am new to both ajax and servlets so i dont know how to proceed
plz help me
Oct 4 '07 #1
4 5322
dmjpro
2,476 2GB
i dont know in which forum to post it in as it has both servlets and javascript in it

i have made an ajax request to server side to read the values of a cookie and then send these values to javascript file and then close the connection

ive done the part of sending and receiving but i dont know how to close the connection after that
what code should i write in javascript or servlet to close the connection
i am new to both ajax and servlets so i dont know how to proceed
plz help me
Post your relevant code here with code tags.
I have two question .....
Q.1: Why you read the cookie values from the server as it can be available in Client Side?
Q.2: Which connection you are talking about?

Debasis Jana
Oct 4 '07 #2
well my aim is to read values of third party cookie set by us and this cant be done from client side so i am using ajax to let server side read the values of cookies and then give these values to js file. ive done till this part but after sending the values how do close the current connection by the ajax request
Oct 4 '07 #3
dmjpro
2,476 2GB
well my aim is to read values of third party cookie set by us and this cant be done from client side so i am using ajax to let server side read the values of cookies and then give these values to js file. ive done till this part but after sending the values how do close the current connection by the ajax request
You need not to do like that.
Your browser will take care of it :-)
Simply enjoy your code.

Debasis Jana
Oct 4 '07 #4
dmjpro
2,476 2GB
well my aim is to read values of third party cookie set by us and this cant be done from client side so i am using ajax to let server side read the values of cookies and then give these values to js file. ive done till this part but after sending the values how do close the current connection by the ajax request
Were you talking about this ?

Expand|Select|Wrap|Line Numbers
  1. http_request.setRequestHeader("Connection", "close");
  2.  
Debasis Jana
Oct 4 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Daniel | last post: by
14 posts views Thread by =?Utf-8?B?TWlrZVo=?= | last post: by
6 posts views Thread by =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.