FCI-Helwan blog

Just another FCI-H weblog

Limitations on using Cookies

Make note of the following limitations when using Cookies (I’m not sure if that applies to all Web-technologies or just Asp.Net, but I’ve just solved a bug related to this issue using Asp.Net):

  • A cookie size is limited to 4096 bytes. It is not much, so cookies should be used to store small amounts of data. For larger amounts of data
  • Also, number of cookies is limited to 20 per website. If you make new cookie when you already have 20 cookies, browser will delete oldest one.
Quoted from beansoftware.com
Advertisements

November 18, 2008 - Posted by | ASP.NET, Tips

1 Comment »

  1. “(I’m not sure if that applies to all Web-technologies or just Asp.Net, but I’ve just solved a bug related to this issue using Asp.Net)”

    It’s a browser limitation and not related to the web technologies … and recently browsers start avoiding these limitations and increase those variables.

    Microsoft indicated that Internet Explorer 8 increased the cookie limit per domain to 50 cookies

    Firefox has a per-domain cookie limit of 50 cookies.

    Opera has a per-domain cookie limit of 30 cookies.

    Safari/WebKit is the most interesting of all as it appears to have no perceivable limit through Safari 3.1. I tested setting up to 10,000 cookies and all of them were set and sent along in the Cookie header. The problem is that the header size exceeded the limit that the server could process, so an error occurred.

    good luck 🙂

    Comment by Hosam Kamel | November 19, 2008 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: