473,395 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Quick one - Is SESSION per browser instance or per IP Address?

We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.
Apr 4 '06 #1
8 5470
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.

Apr 4 '06 #2
Yes, I read that IE uses the same session ID, but what about session
variables that I create? For example,
Session["USERID"] = id;

Then if I open another browser and click on another user, a different ID
should be stored to the session variable. Will the 2 browsers confuse the
USERID session variable?

"Juan T. Llibre" wrote:
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.


Apr 4 '06 #3
re:
Will the 2 browsers confuse the USERID session variable?
No.

You will have individual session contents in each browser's session.

btw, the SessionID is recycled by IE only when Session.Abandon is called.
In normal operation, IE will get different sessions for each instance that is opened.

I just opened 3 browser instances with IE, and they all had different session ID's.

I wouldn't worry too much about that.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com... Yes, I read that IE uses the same session ID, but what about session
variables that I create? For example,
Session["USERID"] = id;

Then if I open another browser and click on another user, a different ID
should be stored to the session variable. Will the 2 browsers confuse the
USERID session variable?

"Juan T. Llibre" wrote:
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
> We have a question here where a developer says that if the same user starts 2
> instances of the application on his machine, the session variables may get
> mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
> had its own session and the two instances of the application would never get
> mixed up? Thanks.


Apr 4 '06 #4
Um, try it and see??

Apr 4 '06 #5
Um, I am new at this and wasn't entirely sure of the way to go about testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??

Apr 4 '06 #6
It is per browser instance. If using frames, it may be more than one per
browser instance.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Um, I am new at this and wasn't entirely sure of the way to go about
testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??

Apr 5 '06 #7
not necessarily
if you right click on a link and select "open in new window"- you will have
2 browser instances using the same session


"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uL**************@TK2MSFTNGP04.phx.gbl...
It is per browser instance. If using frames, it may be more than one per
browser instance.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Um, I am new at this and wasn't entirely sure of the way to go about
testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??


Apr 10 '06 #8
I think both Ctrl-N and shift-clic ("open in new window") will open a new frame in the same browser instances, not 2 browser instances. That's why the two frames will share the same session.


not necessarily
if you right click on a link and select "open in new window"- you will have
2 browser instances using the same session
Apr 27 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
6
by: Donnie | last post by:
can session variable hold objects that can later be reference by other pages? if so, i get an "incomplete object" error when i try to call methods from the object I have stored in the session. any...
13
by: Mimi | last post by:
Hello, I am having trouble using the session vars in PHP 4.3.9 OS: Win XP Prof Web Server IIS (is local and there are no links to other servers from the web pages I work on) Browser: IE 6.0 ...
30
by: Robert Tweed | last post by:
Does anyone know a good resource discussing the issues involved in session theft? I've read a couple, but none that really address the problem apart from acknowledging that it is a problem; you...
1
by: YT | last post by:
Couple of quick ASP (3.0) Cookie questions: 1/ I'm using a cookie in my asp script to place cookies (within a key) so my code looks like: Response.Cookies( "quoteform" )( "name" ) = Session(...
7
by: Bill | last post by:
I've noticed that in my ASP application that session variables are not carried over from one IE6 open browser window to another. Can anyone tell me how IE can do this? It seems like it's a useful...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
16
by: Jonathan Wood | last post by:
Greetings, I was wondering if anyone here has a good understaning of the Session object. I know there are options like the Session.Abandon method and the regenerateExpiredSessionId setting,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.