firefox storing cookies in odd way.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tores
Forum Contributor
Posts: 120
Joined: Fri Jun 18, 2004 3:04 am

firefox storing cookies in odd way.

Post by tores »

Hi

Have a problem with Firefox: When opening a new tab or browser when another exists, the new tab or browser contains the same session-cookie as the first one. So to really get a new cookie I need to close all firefox-windows and then open a new one.
If I could tell when my index-script where loaded for the first time (in a new browser or tab) I could just re-assign the session_id each time.
Can this be achieved in any way?

regards tores
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

you can have a page that calls session_regenerate_id....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's also switch the previous tab to the new session id as well however.
tores
Forum Contributor
Posts: 120
Joined: Fri Jun 18, 2004 3:04 am

Post by tores »

that's also switch the previous tab to the new session id as well however.
That's true.... Firefox only keeps one session_id for all open windows and tabs. Altering the id in one window/tab also alters it for the others.
This is a really annoying feature of firefox!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's pretty true for all browsers.. (sessions/cookies span all instances)
tores
Forum Contributor
Posts: 120
Joined: Fri Jun 18, 2004 3:04 am

Post by tores »

that's pretty true for all browsers.. (sessions/cookies span all instances)
Not IE. Starting a new explorer while another is running gives a new session_id, independent of the other.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

If you open the window with ctrl+n in IE the session will be shared. If you start a new iexplore.exe process, it doesn't share the session.



ps: IE is not a browser, it's an Operating System.... Before i used to think that it was win32 port of emacs :P
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

tores wrote:Not IE.
Only if it's creating a new process; i.e. Start > Internet Explorer. Opening a new window, last I checked did not do this behaviour..
Post Reply