Limits on the size and number of cookies for different browsers

Source: Internet
Author: User

One, the browser allows each domain name contains the Cookies Number:

  Microsoft noted that InternetExplorer8 added a cookie limit of 50 per domain name , but IE7 also seems to allow 50 cookies per domain name .

  Firefox has a limit of 50 cookies per domain name .

  Opera has a limit of 30 cookies per domain name .

  Safari/webkit seems to have no cookie restrictions. However , if there are many cookies, the header size will exceed the server 's processing limit, which can cause errors to occur.

Note:"Each domain cookie limit is 20 " will no longer be correct!

second, when a lot of Cookies is set, how the browser responds.

In addition to Safari (you can set all cookies, no matter how many), there are two ways:

Least recently Used (LRU) method: When the cookie has reached the limit, automatically kicks apart the oldest cookie to give some space to the latest cookie. leastrecentlyused InternetExplorer and Opera Use this method.

  Firefox is unique: Although the last set of cookies is always retained, it seems to randomly determine which cookies are retained. There seems to be no plan (recommended: do not exceed the cookie limit in Firefox).

three, different browser between Cookies The total size is also different:

  Firefox and Safari allow up to 4,097 bytes of cookies, including the name (name), value,and equal sign.

  Opera allows up to 4,096 bytes of cookies, including: Name, value,and equal sign.

  InternetExplorer allows a cookie to be up to 4,095 bytes, including: Name, value,and equal sign.

Note: Multibyte characters are calculated as two bytes. In all browsers, any cookie size exceeding the limit is ignored and will never be set.

Iv. Summary Form

Here are the different restrictions on cookies between browsers:

ie6.0

ie7.0/8.0

opera

ff

safari

chrome

cookie number:

Each domain is 20

Each domain is 50

Each domain is 30

Each domain is 50

no number limit

53

Total Cookie Size:

4,095 bytes

4,095 bytes

4,096 bytes

4,097 bytes

4,097 bytes

4,097 bytes

Limits on the size and number of cookies for different browsers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.