Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in session handling

 
Nitin Vashishtha
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,
on page 199,HFSJ,it is mentioned that the client can open a new browser window and the container can use the same session for the request from this new browser window.
So that means that the session cookie which was stored on the first browser,will be used by all the subsequent browsers requests?
and the cookie will be killed only when all the instances of the browsers will be closed?(since I think the cookie will be killed when we close the browser,in case of single instance of browser making the request).
Could someone clarify how the browsers haldle with the session cookie.

Thanks,

Nitin
SCJP(91%).
 
Rhett Wang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question!

I have found this fact in my work.
In IE, we can use Ctrl+ N to open a new window, and the new window will keep the same session.
But It seems that FireFox does not work like this.

BTW,I think we should do some research about the difference of Tab and Window.

Hope to get more infomations.
 
Nitin Vashishtha
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Wang.
You are correct,it keeps the same session if we open a new window using ctrl+N,but if we open a new window from outside,it wont keep the cookie information,and that request will not be treated as a part of the session.
Also,in case of URL Rewriting,even if we open a new window from outside ,and we copy and paste the url from the main browser window,it will keep the session,since now we are passing the session-id information in the url itself.

Thanks,
Nitin

SCJP 91%
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic