Cookies and refreshing

Results 1 to 2 of 2

Thread: Cookies and refreshing

  1. #1
    Join Date
    Dec 1969

    Default Cookies and refreshing

    OK I have tried a suggestion posted earlier, and I have it work ok , but not great. Here is what I currently have working. A user clicks the message board link and when it detects that no cookie is present through:<BR><BR> "if Request.Cookies("USERNAMECOOKIE")("USER")="" then <BR> Response.Addheader "refresh", "0;URL=/login/"<BR>end if"<BR><BR>it send the user to the login page so the cookie may be set. then the user logs in and for some reason "needs to login in twice" before the user is redirected back to the message board page through:<BR><BR>"if Request.Cookies("USERNAMECOOKIE")("USER")&#060;&#0 62;"" then<BR> Response.Addheader "refresh", "0;URL=/board/"<BR> end if"<BR><BR>Why do they need to log in twice to be redirected back to the message board? And any suggestions for a solution?<BR><BR>MIKE

  2. #2
    Join Date
    Dec 1969

    Default From what you posted...

    ...this is a bit hard to say. Could have to do with caching, since you&#039;re doing the redirect in the header of the page rather than using Response.Redirect. The redirect header will be cached on the client, so once they have logged in, they get back to the cached page, which automatically redirects them back to the login. Why it then works the second time round, I&#039;m not sure.<BR><BR>Can you maybe show us the code for the login? Also, I would do the redirect using Response.Redirect and not using the refresh header.<BR><BR>Oliver.

Posting Permissions

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