To be honest, I rarely pay attention to this issue in my daily use of JS and rarely use cookies, so I was dumbfounded when I was asked this time. I couldn't explain why, so in the end I just said: I can honestly admit that I don’t know much about the operation of this cookie. Today, a colleague asked about cookies again, so I checked online and made some relevant summaries and recorded them for future reference. As a JS programmer, you should be relatively familiar with the operation of cookies, so I won’t explain it too much.
The following are the different restrictions on cookies between browsers:
IE6.0
|
IE7.0/8.0 |
Opera |
FF |
Safari |
Chrome |
||||||||||||||||||||||
Number of cookies: |
20 for each domain |
50 for each domain |
30 for each domain |
50 for each domain |
No limit on number |
53 for each domain |
|||||||||||||||||||||
Total cookie size: |
4095 bytes |
4095 bytes |
4096 bytes |
4097 bytes |
4097 bytes |
4097 bytes |