Trouble with cookies and sessions....

Results 1 to 2 of 2

Thread: Trouble with cookies and sessions....

  1. #1
    Join Date
    Dec 1969

    Default Trouble with cookies and sessions....

    Hey everyone, I have a dilema. I want to create an application (like a real-time shopping cart) which shows you a preview what items you have added into it. <BR><BR>Here is the asp page:<BR><BR>(it is the bottom-most cookie that appears only)<BR><BR>Here is the associated code:<BR><BR><BR>The only problem is that when you refresh your browser the cookie value changes also. Is there a way for the cookie to stay the same? The same thing happens when i use sessions.. what can I do?<BR><BR>If this were to be a hig-traffic site would it be better to just use session objects instead of cookies? What&#039;s the difference really?<BR><BR>Thanks for any help,<BR>Shu

  2. #2
    Join Date
    Dec 1969

    Default RE: Trouble with cookies and sessions....

    The difference is simple. Normally cookies are used to store information on a client "after the session expires". For example. you go to a site, then return 3 weeks later to have it remember your "personal settings" or something. I use Session Variables to maintain state. This is normally the best way. When the browser is refreshed, the session does not "end".<BR>See FAQ&#039;s, there are several on Session Variables that apply.

Posting Permissions

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