473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

More cookies from one document?

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
3 1487
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
1
by: duane | last post by:
Dear Experts: I have a problem. When you enter the website I am working on, wherever you go within the website, the URL address on the website will display: "http:\\..\index.html", whether...
1
by: Karl | last post by:
Hi there! I have a big Problem with some Javascript: On a website, i want to paste some "confirm", if the visitor's browserlanguage is not "de". when he confirm, he'll be redirected to the...
1
by: Robert Oschler | last post by:
I have two sites, both with valid P3P policies that passed the W3C P3P validator, including the P3P compliant HTTP headers test. On one of the sites, Site A, I have a web page that loads a...
0
by: Amit Jamgade | last post by:
Hi, I am making use of cookies to store the Session State information through JavaScript as given below in an ASP Page. Suppose I have XYZ.asp page. The code in this page goes as shown below....
10
by: Stephan Schulz | last post by:
Hi all, I'm fairly new to JavaScript, and couldn't find a way to solve the following problem: I've written an application in DHTML/JavaScript, for one because I want to be able to offer...
1
by: FishKeeper | last post by:
I'm trying to write JavaScript code to test whether cookies are enabled by writing a cookie and then reading its value. My code works fine in Firefox, but it's not working in Internet Explorer 6. ...
12
by: Don Juan | last post by:
I have a simple html document I have been using for some time on my (i.e.) abc.com domain that uses cookies. I recently purchased a new domain name and set up a service to redirect my new domain...
7
by: cmrchs | last post by:
Hi, In Windows Vista: where does asp.net write its cookies? I use HttpCookie objCookie = new HttpCookie("nameCookie"); in Win2000 (and later) they used to be in C:\Documents and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.