Date:  11/05/2002 04:36:54 PM Msg ID:  000989
From:  FoxWeb Support Thread:  000985
Subject:  Re: Cookies not kept when brower closed
Cookies with an expiration date are kept until that date.  Cookies without an expiration date are deleted as soon as all browser windows are closed.  Based on what you say in your message, the two cookies should not be deleted when you restart IE.
 
If you provide us with the URL of your application, we can try connecting to help you troubleshoot this problem.

FoxWeb Support Team
support@foxweb.com email

Sent by Jeff Grippe on 11/05/2002 08:51:57 AM:
I am trying to use cookies to store some information that can be used to restart a session that has timed out (if there's a better way I'm willing to hear that as well).
 
When the user is working on something that might need to be restarted there are 2 things I need to know: ReqTable (the database file) and Batch (an internal Batch number). My design is as follows:
 
 
When a Batch is opened I call:
 
Response.SetCookie("ReqTable", ReqTable, date() + 10)
Response.SetCookie("Batch", TheBatch, date() + 10)
 
 
When a Batch is finished normally I call:
 
Response.DelCookie("ReqTable")
Response.DelCookie("Batch")
 
 
After My Login Screen I do:
 
ReqTable = Request.GetCookie("ReqTable")
Batch = Request.GetCookie("Batch")
if not empty(ReqTable)
     * set some session variables
     Response.Redirect("NewRequest.FWX")
endif
 
 
For Debugging I put the following in my main screen:
 
<h3><%=Request.GetCookie("Batch")%></h3>
 
 
If I create a new batch and add a few line items I observe the following:
 
1. If I then hit the button to return to my home page (which is outside of the FoxWeb based site) and then return to my site and login, the code above works fine and I am returned to editing the batch.
 
2. If I close the browser, open it again, and then go back to the site and login it does not see the cookies.
 
I'm using IE 6 SP 1 and I changed the privacy settings to "Allow All Cookies" before I started this testing.
 
Thanks,
 
Jeff Grippe