Cookies or Session Variables?

Results 1 to 5 of 5

Thread: Cookies or Session Variables?

  1. #1
    James Perry Guest

    Default Cookies or Session Variables?

    I have a multiple forms where I will submit to a SQL DB once the user has completed all forms. What is the recommended practice for storing form data, cookies or a session array? These forms are in succession and collect data from some 115 form fields. Is this to much data for a cookie to handle? I have no intention of storing this cookie beyond the user session and as a test to see it size, it is about 3k in size. I, using a dictionary cookie with name/value pairs.

  2. #2
    Join Date
    Dec 1969

    Default 3K should be okay...

    ...either way.<BR><BR>If you have a really, really busy site, then the cookie is almost surely preferable. Else...well, whichever is easier.<BR><BR>

  3. #3
    peterjl Guest

    Default What about hidden form fields

    I suggest that the best way is to store the intermediate data in hidden form fields. That way you avoid the possibility a session timing out.<BR><BR>Of course there are other issues.<BR><BR>Session vars are more secure, because they are stored only on the server.

  4. #4
    Join Date
    Dec 1969

    Default Good point...

    Both cookies and hidden form fields are inherently insecure, since they must be sent back and forth between server and client. Even if you don&#039;t care if the client sees the info, be aware that a "snooper" program listening on the line could see them. <BR><BR>You *could* encrypt either of those, of course. Since you could use a 100% private encryption scheme (no need for a public key since only the server needs to be able to encode and decode), this would be pretty darned secure! At least as secure as https, for example.<BR><BR>

  5. #5
    James Perry Guest

    Default RE: What about hidden form fields

    I have 13 forms in sucession, that&#039;s a lot of hidden input that I would have to carry from page to page.

Posting Permissions

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