Results 1 to 3 of 3

Thread: maximum size of cookie content

  1. #1
    Join Date
    Jul 2004

    maximum size of cookie content

    Hi people

    I was wondering if anyone knows whether there is a maximum size limit on a cookie content

    If so,
    1) Is this a limit per cookie in a single domain? i.e. no single cookie value can exceed XX bytes
    2) Is this a limit on all the cookies that get saved under a single domain? i.e. the total size of all the cookies cannot exceed XX bytes
    3) Is the limit different from browser to browser?
    4) How can I detect what the limit is?


  2. #2
    Join Date
    Jan 2005
    Alicante (Spain)
    With Firefox and Opera you are talking 4092 and 4091 string length respectively, IE is more. Apache errors out on about 6kB of cookie and will not serve the request at all.

  3. #3
    Join Date
    Mar 2005
    Sydney, Australia
    Your best solution if you need more than 4k would be to use sessions and just save an identifier in the cookie. Sessions allow for a lot more information than cookies do they just don't allow you to save anything between browser sessions so you will need to save the session data in a file or database and use the cookie to identify which data to retrieve to set up the session for the next visit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles