MozillaZine

max number of cookies Per-Domain doesnot work

Discussion of bugs in Mozilla Firefox
smallriver
 
Posts: 4
Joined: February 27th, 2017, 7:50 pm

Post Posted February 28th, 2017, 8:55 pm

Hi, all
We are soft engineers from Alibaba-inc . Recently, We encounter a problem of repeatedly signing in to a page which reqires logined session, it make us confused. Finally, we found the cause of that problem : the cookies which denoted logined session were evicted! Then we check all the cookies that stored by firefox, and found two phenomenons:
(1) the number of cookies belong to the domain(.taobao.com) is not exceeding 150.
(2) the number of cookies whose root domain is .taobao.com reached 150 (including sub domain cookies).
So can we guess that firefox has some bugs in storing cookies for each domain ?

In order to verify our guess, we also make a test, and list the procedures(firefox version 50.0):

1. We clear all the cookies that stored by firefox, then visit page = https://reg.taobao.com/member/reg/fill_mobile.htm

2. Using js script to write 150 cookies(domain=reg.taobao.com) in the console of firefox. The js script as follows:
Code: Select all
function setCookie(name,value) {
    var Days = 30;
    var exp = new Date();
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString()+";Domain=reg.taobao.com"
}

for(var i=1;i < 151;i++){
  setCookie("name"+i,"value"+1);
}


3. check the cookies stored in firefox, found it is ok with 150 cookies in domain of reg.taobao.com

Image
Image

4. visit page = https://login.taobao.com/member/login.jhtml , then check cookies , found that some cookies(belong to domain=reg.taobao.com) were evicted,but those cookies have different domain with the later ones, as following pictures indicate:

Image
Image


So , from the above test case, we can see that the total number of cookies in the root domain of taobao.com is also 150, but each sub domain does't reach its limit number of 150. Then we conclude that firefox may have bugs in its implementation of storing cookie , so we just put forward such problem for discussing, anyone else who encounter such case can contact us. We hope firefox developers can reply to us whether this is a true bug or not, thanks a lot :D .

smallriver
 
Posts: 4
Joined: February 27th, 2017, 7:50 pm

Post Posted February 28th, 2017, 8:59 pm

haha,hope to discuss this case with others~

therube

User avatar
 
Posts: 17289
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted March 1st, 2017, 6:45 am

According to this, http://browsercookielimits.squawky.net/, your 150 sounds correct.

And more, & differing:

http://stackoverflow.com/questions/5381 ... n-browsers
http://webdesign.about.com/od/cookies/f ... -limit.htm

Guess you could search https://bugzilla.mozilla.org, or browser source, or "ping" a mozilla developer, & you might find where things currently stand.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

smallriver
 
Posts: 4
Joined: February 27th, 2017, 7:50 pm

Post Posted March 2nd, 2017, 7:24 pm

@therube
Thanks for your advice, I visit https://bugzilla.mozilla.org and post a bug, hoping to receive reply.

therube

User avatar
 
Posts: 17289
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted March 2nd, 2017, 9:02 pm

Bug # ?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

Return to Firefox Bugs


Who is online

Users browsing this forum: No registered users and 1 guest