Cookie/Session not working for some people (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


hzarabet -> Cookie/Session not working for some people (9/27/2009 11:46:09)

Hi all:

Boy! I haven't been here in about 2 years and I didn't recognize the place. I hope Spooky and all are doing well!!! This has always been the most wonderful learning forum

I have a landing page running. If the user goes to the page once he has a cookie set for 1 day stating that he has seen the page so he doesn't have to keep going back to the landing page that day. This is working fine for (what I hope!) are the vast majority of my users (4500 per day). But I occasionally get some emails stating that some people keep getting kicked back to the landing page and never make it to their intended destination. I just spoke to one of these users on the phone. He is using IE7. Privacy set to MEDIUM. Seems fine so far. But he can't get past the landing page. I set up a test page to see if the cookie is being read. It is not. So I tried adding a Session option as a fallback. Where if the Cookie OR the Session is "Y" then he can go further. Still no good! So his PC didn't read the Session either.

OK. Here is the landing page. If you choose the bottom of the 4 options in RED that SHOULD take you to a search page. If someone could click on it and tell me if this is NOT taking you to a seach page that would be helpful.

And here is the ASP Classic code to set the cookie and session:

<%Response.Cookies("SHL_Landing")="YC"%>
<%Response.Cookies("SHL_Landing").Expires=Date()+1%>
<%Session("SHL_Landing")="YS"%>


And here is the code to read the cookie and session:

  <%
  If Request.cookies("SHL_Landing")&""="" OR Session("SHL_Landing")="" then
  Response.redirect "landing.asp"
  ElseIf Request.cookies("SHL_Landing")&""="YC" OR Session("SHL_Landing")="YS" then 
  End if
  %>


Thank you all!




ou812 -> RE: Cookie/Session not working for some people (9/27/2009 17:27:17)

I didn't really read through your logic/code and just tried the page, following your instructions. It worked for me. I went to the search page, after selecting the red option. On the search page, in the upper left was displayed "YSYC"

I tried it in IE7 with medium privacy and security




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625