I am trying to create a cookie for maintaining a user session.
In the first page after login the user will give some input to verify his identity.If the identification information is valid then one cookie will be created.
On the second page there will be few more input to validate identity of the user. If the information is invalid in second page then I need to overwrite the first cookie and log the user out.
But after the log out, I can still see the cookie which was created in first page is still exists.
And so the user can skip the first page and directly go to second page without any validation.
I have tried the following things-
1. setting cookie max age to 0. But I can see 2 cookie of the same name. One is the first one and other is the newly created cookie for over write the first one.