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