Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many cookies can we have for a domain?

Tags:

cookies

I know that there is a limit on how much data can a cookie hold, but is there a limit on how many cookies can we set?

like image 359
daniels Avatar asked Mar 12 '11 09:03

daniels


People also ask

Can you have multiple cookies for same domain?

Yes, one domain can generate many cookies. The maximum number varies by browser.

How many cookies we can store per server domain?

If you want to support most browsers, then do not exceed 50 cookies per domain, and 4093 bytes per domain. That is, the size of all cookies should not exceed 4093 bytes. Cookies are sent on every request for a domain, this includes images.

Is there a cookie limit?

According to Microsoft its 4096 bytes. cookies are usually limited to 4096 bytes and you can't store more than 20 cookies per site. By using a single cookie with subkeys, you use fewer of those 20 cookies that your site is allotted.

How many cookies are on a website?

According to Cookiebot, websites use around 20 cookies on average, most of which are loaded by other third-party cookies, which makes them very difficult to detect. This seems like a lot, and it is.


1 Answers

Based on my own research, I suggest that you do not exceed 50 cookies per domain, and 4095 bytes per domain. That is, the size of all the cookies on your domain should not exceed 4095 bytes.

If you want to read more, I have shared my research here.

like image 121
Iain Avatar answered Oct 11 '22 12:10

Iain