tags:

views:

59

answers:

3

Hello,

I have a very basic knowledge of the web programming, and I couldn't figure out the answer to this question.

Typically, a cookie is used to identify a session in web applications. However, as far as I know, multiple browser windows share cookies. In that case, how does web applications distinguish between the tabs?

ADDED : I guess all the answers are saying the same thing - there is no standard way to handle this. Ok. Thanks for resolving my uncertainty guys.

+1  A: 

They don't. The application does not know that you have two tabs open. If you are tracking sessions then it can know that you have two sessions open.

What are you trying to accomplish?

Dustin Laine
+1  A: 

They don't. You have one cookie per different browser (ff/ie/ google chrome).

You'll have to distinguish the tabs client-side (ie Javascript).

remi bourgarel
A: 

However, as far as I know, multiple browser windows share cookies. In that case, how does web applications distinguish between the tabs?

It cannot distinguish at all. Hence comes the challenge for web developers - make their application robust to prevent data destruction or unauthorized operations when access is performed from some other "outdated" tab.

Developer Art