1)Everytime a new Session gets created when a new browser window is opened on the same machine.
Yes,Everytime new session is created if that web developer is not done some coding to avoid that.
(e.g. Just Login to javarach in IE close IE from cross at right upper side and again open new IE browser see you are still login that means session is get maintained same for google's gmail)
Session id /session remains same if user does: File->New Window from the IE browser window?
Hi, Amarkirt. Everytime new session's will gets created, only when different new browser windows are opened on the same machine. New session's will not gets created, if we open with same type of windows.
The process is, if we open a gmail or yahoo or any application that use sessions internally, will creates session object, when a request comes, and encapsulated it into cookie object and will add to the response header and will sent to the client(browser). Now the browser is having cookie(inside it session id present). And everytime the browser will communicate to that site with this session id.
Suppose if we open gmail in two new windows of same type, like two firefox or windows IE, the gmail application will not create two different session objects. If a request made to gmail through firefox, the gmail application create session object and will sent to the firefox in the form of cookie. If we open the same gmail in different firefox window, the firefox uses the first cookie object. Already the session id sent to the firefox in the form of cookie. The two different firefox windows communicates to the gmail with same session id. The firefox uses that cookie everytime it needed to communicate, it is same incase of IE.
If we open the gmail one with firefox and another in IE, then the gmail application will create two different session objects, one for firefox and another for IE.
Hey Chinmaya , Great Explanation!!!
Keep up the good work!
When i opened Gmail and yahoo in the same browswer window (different tab) it was signed in.
Howevere when i opened a fresh IE window, I was not signed in.
That means Gmail and Yahoo are maintaining the session based on the browser window
However in case of Java ranch , I was logged in both the cases ( when i opened it in the same window (new tab) and even in a complete new IE window).
Does that mean it maintains its session based on the IP address or something and not on the browser window
And that different applications maintain session in different ways..
Just wanted to know if I am thinking on the right track...
The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Joined: Apr 21, 2008
Hi, Nabila. Thankyou. JavaRanch follows different strategy, rather than providing unique session id. I think it will not made session's depending on IP address. Incase of private network, we have local IP addresses. The server will not send packets to local IP address system directly. It will first sent to the router(router maintain's a table containing the local IP address details), it is the job of router to send the packets to the system which made a request to server. To the server, IP address of the system is the IP address of the router. I think JavaRanch will not follow this strategy. I think it follows unique hardware installation key, every system will have unique key(I am not sure about this).