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

后端 未结 3 1313
抹茶落季
抹茶落季 2020-12-20 16:19

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

3条回答
  •  星月不相逢
    2020-12-20 16:41

    AFAIK the number of cookies you can set is 20 per domain or 300 maximum and each cookie across the board is generally capped at a 4k limit.

    The RFC for cookies (section 6.3) has most of the information you want to find.

    As far as setting a cookie larger than the recommended size is concerned, I would suggest that some browsers will handle that differently, but taking the lowest-common denominator into consideration (IE6), I'd suggest you consider different forms of data persistence if you have that much data you need to store.

提交回复
热议问题