Maximum number of cookies allowed

前端 未结 6 1874
甜味超标
甜味超标 2020-12-10 03:30

As far as Google searches tell me, the maximum allowed number of cookies depends very much on the browser, however I cannot find any recent data as to how much cookies are a

6条回答
  •  隐瞒了意图╮
    2020-12-10 03:53

    From the rfc:

    • at least 300 cookies

    • at least 4096 bytes per cookie (as measured by the size of the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie header)

    • at least 20 cookies per unique host or domain name

    Those are minimum requirements. The IE6 team didn't get that. Everything else is highly browser-specific. You'd better write a test-platform to test each browser. Test the maximum size and number with little incremental steps (and check if they still are readable).

    Also, I seem to remember apache has a problem with huges numbers of cookies. Can't remember where i've seen that though.

    Here is a little cookie-testing script: http://krijnhoetmer.nl/stuff/javascript/maximum-cookies/

提交回复
热议问题