Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 views
in Technique[技术] by (71.8m points)

javascript - What is the number and size of cookies allowed by major browsers?

Just wondering what is the size and number of cookies allowed by IE, FF, Chrome, and Safari. What is the number allowed per host and the size of each cookie? Also what would happen if you try to store cookie larger than the max size using Javascript?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It varies from browser to browser. The biggest limitation is IE6 which can only accept 20 domain cookies (all other modern browsers [FF3+, IE7/8, Safair 4/5, Chrome] can accept much much more). Once IE6 reaches it's 20 cookie limit, it randomly overwrites an older cookie, which is a major concern since you'll never know which one got removed.

If you like the run some specific tests -- visit this blog post and experiment with the authors test scripts.

http://www.ghacks.net/2008/08/16/browser-cookie-limits/

Hope that helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...