搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

subdomain cookie not being created on firefox versions 3.6.11 and later

  • 1 回覆
  • 11 有這個問題
  • 2 次檢視
  • 最近回覆由 cor-el

more options

I have a website with a subdomain:

test1.k12.hi.us

and I am setting a cookie so that it can be accessed by subdomain:

test2.k12.hi.us

My code works on all modern versions of IE, Chrome, Safari and Firefox versions prior to 3.6.11. However, the cookie doesn't seem to get set properly in Firefox 3.6.11, 3.6.12 and the 4.0 beta with the same code.

I am setting a session-lived cookie and specifying the domain as ".k12.hi.us". If I set the cookie domain as either "test1.k12.hi.us", "test2.k12.hi.us", the cookies are set but the cookies can't be shared between the subdomains. I would like to set the domain as ".k12.hi.us" so that I can't share the cookies between the two subdomains. Is there a bug in the Firefox 3.6.11 and later versions that prevents cookies being set properly in this manner? Your help would be appreciated. Thanks.

I have a website with a subdomain: test1.k12.hi.us and I am setting a cookie so that it can be accessed by subdomain: test2.k12.hi.us My code works on all modern versions of IE, Chrome, Safari and Firefox versions prior to 3.6.11. However, the cookie doesn't seem to get set properly in Firefox 3.6.11, 3.6.12 and the 4.0 beta with the same code. I am setting a session-lived cookie and specifying the domain as ".k12.hi.us". If I set the cookie domain as either "test1.k12.hi.us", "test2.k12.hi.us", the cookies are set but the cookies can't be shared between the subdomains. I would like to set the domain as ".k12.hi.us" so that I can't share the cookies between the two subdomains. Is there a bug in the Firefox 3.6.11 and later versions that prevents cookies being set properly in this manner? Your help would be appreciated. Thanks.

由 hyenasjungle 於 修改

所有回覆 (1)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25