I want application to clear cookie for every user on first site load after publishing. The matter is, cookies can store much information, that becomes non-actual after publishing, but is still in use. Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One thing that I used to do is set some unique string in the cookie.
Lets say blah blah blah or whatever. And you can keep the same string in the web.config file as well.
When the cookie is read, it checks whether the unique string in the cookie matches the string in the web.config file.
If it is, you simply proceed and if it’s not, you discard the cookie.
So if you simply change the string in the web.config file, next time a user tries to log in, the cookie will be discarded.