small medium large xlarge

Generic-user-small
29 Apr 2009, 02:52
Kedar Mhaswade (21 posts)

When I connect to http://localhost:3000/store from two different Firefox Windows (two separate windows, not tabs), I observe that both of them get the same cart. Thus, when I add an item to cart, it gets reflected in both the windows. My understanding was that each browser window would get its own session. Is that not true?

-Kedar

Generic-user-small
29 Apr 2009, 18:13
Bharat Ruparel (148 posts)

Hello Kedar, No that is not true. The reason is that the same cookie is being shared by two different instances of the browser on the same machine. So a cookie is pretty much acting like a class variable which is shared across different instances of the class. Does that help? Bharat

Generic-user-small
30 Apr 2009, 12:52
Kedar Mhaswade (21 posts)

Thanks Bharat. That makes sense.

You must be logged in to comment