Output Cache, cookie save and page expiry
-
Hi, I am absolutely new to Web programming, so pardon me if I write something stupid in between.. And Thanks for reading the question, any pointers are most welcome The website is in ASP.NET 2.0 / IE 6.0, 7.0 We store login details in a cookie via HTTPCookie class, when user says "Remember Me" in the login page. Now, if he doesn't log out and starts the same website via favourites (The login page loads again), the cookie doesn't get detected and he has to enter his credentials again. If he closes the page and loads the browser again, the cookie does get detected. We have added following values in the login.aspx page, which should take care of reloading the page < OutputCache Duration="1" VaryByParam="none" Location="None" NoStore="true" > It seems, either cookie doesn't get stored until the page is detected or the page is not getting reloaded. Any ideas about it? If the question is not clear, please let me know.. Thanks in advance Misha
Evil triumphs when good people sit quiet...
-
Hi, I am absolutely new to Web programming, so pardon me if I write something stupid in between.. And Thanks for reading the question, any pointers are most welcome The website is in ASP.NET 2.0 / IE 6.0, 7.0 We store login details in a cookie via HTTPCookie class, when user says "Remember Me" in the login page. Now, if he doesn't log out and starts the same website via favourites (The login page loads again), the cookie doesn't get detected and he has to enter his credentials again. If he closes the page and loads the browser again, the cookie does get detected. We have added following values in the login.aspx page, which should take care of reloading the page < OutputCache Duration="1" VaryByParam="none" Location="None" NoStore="true" > It seems, either cookie doesn't get stored until the page is detected or the page is not getting reloaded. Any ideas about it? If the question is not clear, please let me know.. Thanks in advance Misha
Evil triumphs when good people sit quiet...
-
Are your login details are saved in cookies.If yes,then when next time user ligins,read the cookie for credential and authenticate the user and send him to next page.If cookie is not found then again ask the user to give the credentials.
Cheers!! Brij
Thanks so much, It seems the query is not clear. I store the credentials in the cookie. The logic is simple, if cookie found, redirect to next page, else ask for credentials. The problem is that the cookie detection is not working when I do not close the browser and again open the login page in a new browser - via clicking favourites. However, if I close the browser and open the link again, the cookie gets detected. The outputcache tag resolves the problem in some sense, that it forces the page to refresh explicitly, so that the cookie is detected once it is stored. I hope it's understandable now. :confused: Thanks
Evil triumphs when good people sit quiet...