cookie question again

Results 1 to 2 of 2

Thread: cookie question again

  1. #1
    Join Date
    Dec 1969

    Default cookie question again

    &nbsp;<BR>Here is the condition of my problem:<BR><BR>I set the expiry date of my cookie (set to Now()-1) under an asp file named "common.asp". I include this "common.asp" in all asp files under my website. Second, I use frames. One on the top and one at the bottom. But here is the problem: the cookie I set under the "common.asp" work well on the top frame but it&#039;s already expired at the bottom. I need to include the "common.asp" file for every page since the file contain database information.<BR><BR>Any suggestion where I should set the expiry date of the cookie? Thanks.<BR><BR>Gilbert<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: cookie question again

    I don&#039;t think that it&#039;s already expired.<BR><BR>Cookie information is sent in the HTTP requests. When a browser requests a page, it adds any information it has stored in a cookie onto it&#039;s set of headers.<BR><BR>The server can then read this information.<BR><BR>Cookies are set by HTTP responses by the server.<BR><BR>If you have two pages (two frames), both are probably being requested almost instantaneously. Certainly both are being requested before the first has had any HTTP information returned.<BR><BR>If this is the case, the browser hasn&#039;t received the HTTP headers setting the cookie from the first page yet. So it can&#039;t include them in the request for the second page, so it doesn&#039;t seem to be set.<BR><BR>If you need to set the cookie, why not make the frameset page (the page with the &#060;frameset&#062; tags in it), an ASP page and include the common.asp file in that. Then the cookie will be set before the client requests the two pages.<BR><BR>Craig.

Posting Permissions

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