Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum length of cookie text

Status
Not open for further replies.

DanWalter

Programmer
Nov 29, 2000
58
0
0
US
Hello:
In my app, cookies are used to transfer large blocks of text (user comments) from one page to another. I am running across a problem trying to find the smallest maximum number of characters allowed:
a) in a sql db field
b) in an html variable
c) in a cookie.

I'm finding that the size of the cookie is the limiting step. Does a size of approximately 700 characters sound right? On my development server, I can get away with 720 characters, but on the production server I had to reduce that to 700. The html field value is stored in a cookie on page a, where it is input, and is passed back to page b. If the length is > 700, no value is stored in the cookie.

Any ideas?
TIA,
Dan

Dan Walter
Daniel.Walter@uvm.edu
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
I think the size used to be about 2K-4K for a cookie, but it might have changed especially in different browsers.

What I don't understand though is why you are needing to pass this information in a cookie? Personally I would use sessions to pass the data between pages.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting
YetiHost - Coming Soon

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Thanks, folks. I thought it may have been browser or IIS setup specific.

I will look into sessions as an alternative - the web is always changing and no doubt we will be updating the site sooner rather than later.

Dan

Dan Walter
Daniel.Walter@uvm.edu
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top