Browser Cookie Limits

Martin Brinkmann
Aug 16, 2008
Updated • Dec 9, 2012
Internet Explorer
|
7

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.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. 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?

  2. 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

  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. 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.

  5. 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”.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.