|
-
Aug 23rd, 2006, 11:52 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Sessions and browsers
I just wondered what exactly creates a new session on a web server.
For example if i visit the same website in 2 different tabs of a tabbed browser would each create a new session on the server or would they both share the same 1?
-
Aug 23rd, 2006, 01:23 PM
#2
Re: Sessions and browsers
The person writing the page can set the timeout for a session, so how long you waited to open the second tab would determine whether you got a new sessionID or not.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Aug 23rd, 2006, 02:54 PM
#3
Thread Starter
Frenzied Member
Re: Sessions and browsers
ok I realise about session's timing out so if i simultaneously visit the same site then the different windows would share the session?
-
Aug 23rd, 2006, 02:55 PM
#4
Thread Starter
Frenzied Member
Re: Sessions and browsers
Actually ignore this I'll just write a quick web page and find out that way. I was just being lazy really wasn't I?
-
Aug 23rd, 2006, 04:24 PM
#5
Re: [RESOLVED] Sessions and browsers
No, not really. But session isn't clearly defined. What software? PHP sessions? Java Servlet sessions? ASP.Net sessions? HTTP-Auth? Custom-built solutions?
What it comes down to is this: HTTP-Auth is in the hands of the browser, but because it's not session management but only authentication, no browser I know of handles tabs separately.
All other session management typically has two modes of operation: if cookies are available, they're used. Cookies are shared, so all tabs have the same session. If they're not available, though, URL rewriting is the typical solution. This means that every URL either must be passed to a special function or a special filter runs over the entire page. In this case, sessions are separate.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 24th, 2006, 05:01 AM
#6
Thread Starter
Frenzied Member
Re: [RESOLVED] Sessions and browsers
The sessions in question were asp.net and I'd never really thought about it before but was demo-ing a product in 2 firefox tabs and actions (that changed session variables) in 1 tab were affecting the application in the other tab too.
Thanks, you were very informative.
-
Aug 24th, 2006, 02:35 PM
#7
Re: [RESOLVED] Sessions and browsers
 Originally Posted by CornedBee
This means that every URL either must be passed to a special function or a special filter runs over the entire page. In this case, sessions are separate.
Even if the URLs are the same?
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Aug 24th, 2006, 03:53 PM
#8
Re: [RESOLVED] Sessions and browsers
If the URLs contain the same session key, it's the same session. If that happens by any means except opening a link from one session in another tab, it's a security hole.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|