Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome cookie size limit

I'm writing into a session cookie from my plugin in chrome. The browser seems to have a strict limit of 4kb for cookie size. It doesnt seem the case in firefox. Is there anyway i can increase the cookie size limit in chrome?

Thanks

like image 283
kambamsu Avatar asked Mar 30 '10 08:03

kambamsu


People also ask

Is there a limit on cookie size?

According to Microsoft its 4096 bytes. cookies are usually limited to 4096 bytes and you can't store more than 20 cookies per site.

How many characters can a cookie hold?

Here are the limits according to 'browser cookie limits': Chrome & Firefox - No limit to the number of cookies; limit of 4096 bytes per cookie. IE8-10 - 5117 characters per cookie; limit of 10234 characters. Safari on Mac - 4093 bytes per cookie.


2 Answers

According to RFC 1012 cookie size must not be limited by user agent. But the minimum capabilities of a browser or user agent should be at least 4096 bytes per cookie. This limit is applied to the name=value portion of the cookie only.

So some browsers can support longer cookies as well. List :

  1. Internet Explorer 8 allowed cookies up to 4095 bytes
  2. Chrome 9 allowed cookies up to 4096 bytes
  3. Opera 11 allowed cookies up to 4096 bytes
  4. Safari 5 allowed coookies up to 4097 bytes
  5. Firefox 3.6.3 allowed cookies up to 4097 bytes

Source of Answer : http://webdesign.about.com/od/cookies/f/web-cookies-size-limit.htm

like image 61
Amandeep Jiddewar Avatar answered Sep 22 '22 00:09

Amandeep Jiddewar


Chrome supports HTML5 localStorage that allows you to use a dictionary style look up. You can use this to store larger amounts of data instead of passing them back and forth using cookies.

like image 24
Kinlan Avatar answered Sep 22 '22 00:09

Kinlan