More cookies from one document?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Mrazek

    #1

    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
  • Stephen Chalmers

    #2
    Re: More cookies from one document?

    "Martin Mrazek" <mrazek@compik. fd.cvut.cz> wrote in message
    news:dcd39e84.0 405111345.263d5 18c@posting.goo gle.com...[color=blue]
    > 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[/color]

    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




    Comment

    • pcx99

      #3
      Re: More cookies from one document?

      Stephen Chalmers wrote:
      [color=blue]
      > "Martin Mrazek" <mrazek@compik. fd.cvut.cz> wrote in message
      > news:dcd39e84.0 405111345.263d5 18c@posting.goo gle.com...
      >[color=green]
      >>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[/color]
      >
      >
      > 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
      >
      >
      >
      >[/color]

      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.

      Comment

      • martin mrazek

        #4
        Re: More cookies from one document?

        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!

        Comment

        Working...