By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,036 Members | 978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,036 IT Pros & Developers. It's quick & easy.

More cookies from one document?

P: n/a
Hi,
how can one HTML document create more than one cookie? I have bloody
long html form, to save all its values in 4KB of one cookie is
impossible...
MM
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Martin Mrazek" <mr****@compik.fd.cvut.cz> wrote in message
news:dc**************************@posting.google.c om...
Hi,
how can one HTML document create more than one cookie? I have bloody
long html form, to save all its values in 4KB of one cookie is
impossible...
MM


How did you arrive at the conclusion that a document can create only one cookie?
It seems you need to read-up on the basics of cookie handling.
If you get stuck with some actual code, feel free to post it here.
--
Stephen Chalmers


Jul 23 '05 #2

P: n/a
Stephen Chalmers wrote:
"Martin Mrazek" <mr****@compik.fd.cvut.cz> wrote in message
news:dc**************************@posting.google.c om...
Hi,
how can one HTML document create more than one cookie? I have bloody
long html form, to save all its values in 4KB of one cookie is
impossible...
MM

How did you arrive at the conclusion that a document can create only one cookie?
It seems you need to read-up on the basics of cookie handling.
If you get stuck with some actual code, feel free to post it here.
--
Stephen Chalmers


While you can have more than one cookie he is right that many browsers
limit the total size of all a site's cookies to 4k. If this limit
didn't exist, malicious sites could sit there generating cookies until
the user ran out of disk space.

My guess is Martin doesn't have access to server side databases, files,
and scripting languages (php, asp). Cookies aren't meant to store large
amounts of data, more along the lines of a small identification code
your site can read and then extract the relevant data from the site's
own database or stored records.

There's a convoluted way to transfer some of the overhead from cookies
to your web page and that's to profile standard settings.

For instance instead of storing,
verdana-12pt-bold-nounderline-red-green:hover you'd assign a profile
string of say 12. Read the cookie, extract 12 and of course 12 would
assign verdana-12pt etc...

Other than that there's not much else you can do to get around the
restriction. The only real option is to get access to a server side
scripting language and store the user data on the server and use cookies
to identify the record stored in your files.
--
-------------
http://www.hunlock.com -- DHTML for the rest of us.
Jul 23 '05 #3

P: n/a
Thanks both and sorry for unclear question. Of course I know I can store
more values under different cookie names, but as the second of
understood, the problem is, that all cookies from one document seems to
be always in one file limited up to 4kB. That was the point of my
question.

Finally I'm going to restrict functionality of the form on IE and use
ActiveX for saving incomplete-form values on client's disc. Server side
solution is definitelly more friendly to other platform user's, but
there are almost none in the Czech republic among companies who have
obligation to fill this form.

Moreover - you know it - time is pressing and have never programmed
anything on server side...

MM
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.