Browser Cookie Limits - gHacks Tech News

Browser Cookie Limits

Each browser is limited cookies in two ways. The first is a per domain cookie limit that allows a single domain to only store x cookies before the oldest gets erased to make room for the new cookie. The second is an overall cookie limit which erases the oldest cookies when the limit is reached.

The maximum cookies per domain setting usually has impacts on large websites that store lots of cookies on the computer. Remember that domain means that cookies saved from the main domain name but also from all subdomains count towards the limit.

The second limit is not that much of a problem nowadays anymore. Firefox had a hard coded 300 cookie limit back in 2004 which caused some serious problems but most browsers support much more than that so that it's unlikely that users will reach the limit.

Per Domain Cookie Limit:

Here is a test script to test your browser:

Firefox 2: 50 (can bet set between 0 and 65535 in network. cookie. maxPerHost)
Firefox 3: 50 (can bet set between 0 and 65535 in network. cookie. maxPerHost)
Internet Explorer 7: 50 (after applying a patch from Microsoft)
Opera 9: 30
Safari: No Limit(!)

Maximum Cookie Limit:

Firefox 2: 1000 (can bet set between 0 and 65535 in network. cookie. maxNumber)
Firefox 3: 1000 (can bet set between 0 and 65535 in network. cookie. maxNumber)
Internet Explorer: unknown
Opera: unknown

I'd say that I'm a heavy Internet user but I never scratched those limits. Did you experience problems with cookie limits before?

Update: The cookie limit appears to have been changed in newer browser versions. Newer versions of the Firefox web browser for instance support up to 150 cookies per domain while Google Chrome appears to have a 163 cookies per domain limit instead.

The Internet Explorer cookie limit per host has not changed in newer versions of the browser, it is still set to 50 cookies.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. USBman said on August 16, 2008 at 9:25 pm
    Reply

    If Safari’s Per Domain Cookie Limit is “No Limit(!)”, then by extension, the Maximum Cookie Limit would also HAVE to be “No Limit(!),” not “unknown”.

  2. Martin said on August 16, 2008 at 9:31 pm
    Reply

    Semantics. There is always a limit and there is no maximum cookie limit defined. So you could say that the hard drive space is the limit instead.

    Fact is, Apple has not set any hard cookie limit in Safari and that’s no limit for me.

  3. Iain said on April 5, 2011 at 11:26 pm
    Reply

    Great minds think a like. I created a script and tested quite a few browsers recently. If anyones interested it is at http://myownplayground.atspace.com/cookietest.html

  4. pavel said on July 6, 2012 at 4:44 pm
    Reply

    You can use plugin that store multiple values in a single cookie.

    https://github.com/pavelkukov/localdata

  5. buzz said on December 28, 2015 at 10:10 pm
    Reply

    tested fireox v.36 and it has a limit of 150 cookies when running a script from localhost,

    1. smallriver said on February 27, 2017 at 11:00 am
      Reply

      you are right!. I also test at firefox version 50.0 , and it has a limit of 150 cookie. but I have a question that, this limit is for the root domain or for each individual domain? In my test , it seems this limit works for root domain. What do you think?

Leave a Reply