Skip to main content
August 10, 2011
Question

Cookies different for http://mysite vs. http://www.mysite

  • August 10, 2011
  • 1 reply
  • 1409 views

My site stores users login info in cookies and I noticed that they values stored can be different for http://mysite vs. http://www.mysite.  More specifically, I login with two test accounts then logout (storing the username in a cookie) and then I output the username to the screen.  The cookie value is different for http://mysite vs. http://www.mysite even though I followed the same login/logout process on each.

??

    This topic has been closed for replies.

    1 reply

    12Robots
    Participating Frequently
    August 10, 2011

    Different how?

    August 10, 2011

    I go to http://mysite and login with username_x.  Then I logout.  Then I navigate to http://www.mysite and login with username_y.  Then I logout.

    Then I open both URLs up in different windows and each window remembers a different username.  That's not what I want.  I want only one value stored in the username cookie regardless of www. or not.

    12Robots
    Participating Frequently
    August 10, 2011

    When you look at the cookies in firebug or some other cookie-viewing tool, do they have different domain values?

    Have you tried setting usedomaincookies="true" in your App.cfc?