session & browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    session & browser

    >> When I open a second browser window from the first, it uses the same session with first!!![color=blue]
    > This is not true. session_id is unique for each combination of browser/url.[/color]

    I believe this too, but you can see:
    1. try http://tassadar.physics.auth.gr/~chameleon/Books/
    2. right-click in one menu link and "open in new window".
    3. in 2nd browser window click greek flag
    4. in 1st browser window click "Programmin g"
    everything in 1st browser window are in greeks!!! (we activate greeks only in 2nd browser window)
    I try Mozilla & IE6 too.

    In the code, I have this for language:
    language is changing with GET (eg index.php?lang= english)
    if $lang is not set (GET) try SESSION
    if $_SESSION['session_lang'] is not set try COOKIE
    if $_COOKIE['cookie_lang'] is not set try language for domain (eg gr=greek it=italian fr=francais default=english )

    What is error?

    thanks


  • Guest's Avatar

    #2
    Re: session & browser


    "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> a écrit dans le message de
    news: bnb7kb$ou1$1@ni c.grnet.gr...[color=blue][color=green][color=darkred]
    > >> When I open a second browser window from the first, it uses the same[/color][/color][/color]
    session with first!!![color=blue][color=green]
    > > This is not true. session_id is unique for each combination of[/color][/color]
    browser/url.[color=blue]
    > I believe this too, but you can see:
    > 1. try http://tassadar.physics.auth.gr/~chameleon/Books/
    > 2. right-click in one menu link and "open in new window".
    > 3. in 2nd browser window click greek flag
    > 4. in 1st browser window click "Programmin g"
    > everything in 1st browser window are in greeks!!! (we activate greeks only[/color]
    in 2nd browser window)[color=blue]
    > I try Mozilla & IE6 too.
    >
    > In the code, I have this for language:
    > language is changing with GET (eg index.php?lang= english)
    > if $lang is not set (GET) try SESSION
    > if $_SESSION['session_lang'] is not set try COOKIE
    > if $_COOKIE['cookie_lang'] is not set try language for domain (eg[/color]
    gr=greek it=italian fr=francais default=english )[color=blue]
    >
    > What is error?
    > thanks[/color]

    Hello,

    Where do you store the $lang var ?? in session or cookies ??? if yes, that's
    the reason why :)

    <<<session_id is unique for each combination of browser/url.>>>>
    i don't think so.... that's true if you start 2 different IE .... (Start[color=blue]
    >Execute > iexplore 2 times)[/color]
    But when you open a new window in IE, it still the same process.... so
    session vars are shared between all window included in the IE process.

    Regards,
    Julien.



    Comment

    • Guest's Avatar

      #3
      Re: session &amp; browser

      > > >> When I open a second browser window from the first, it uses the same[color=blue]
      > session with first!!![color=green][color=darkred]
      > > > This is not true. session_id is unique for each combination of[/color][/color]
      > browser/url.[color=green]
      > > I believe this too, but you can see:
      > > 1. try http://tassadar.physics.auth.gr/~chameleon/Books/
      > > 2. right-click in one menu link and "open in new window".
      > > 3. in 2nd browser window click greek flag
      > > 4. in 1st browser window click "Programmin g"
      > > everything in 1st browser window are in greeks!!! (we activate greeks only[/color]
      > in 2nd browser window)[color=green]
      > > I try Mozilla & IE6 too.
      > >
      > > In the code, I have this for language:
      > > language is changing with GET (eg index.php?lang= english)
      > > if $lang is not set (GET) try SESSION
      > > if $_SESSION['session_lang'] is not set try COOKIE
      > > if $_COOKIE['cookie_lang'] is not set try language for domain (eg[/color]
      > gr=greek it=italian fr=francais default=english )[color=green]
      > >[/color]
      > Where do you store the $lang var ?? in session or cookies ??? if yes, that's
      > the reason why :)[/color]

      I store the (GET) $lang in both session & cookies but I check first if exists in session and if yes I dont check cookies. So,
      different browsers have different sessions...
      If I open twice the browser from the "start menu" in windows, all are great!
      The problem appears when I duplicate a browser window with both IE6 and Mozilla
      [color=blue]
      > <<<session_id is unique for each combination of browser/url.>>>>
      > i don't think so.... that's true if you start 2 different IE .... (Start[color=green]
      > >Execute > iexplore 2 times)[/color]
      > But when you open a new window in IE, it still the same process.... so
      > session vars are shared between all window included in the IE process.[/color]

      Yes I saw it but I believe this is wrongful. isn't it?


      Comment

      Working...