Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

classic asp cookie not deleting

I am setting a cookie in ASP like this:
 response.Cookies("auctionsession") = randomSessionVar
 Response.Cookies("auctionsession").Expires = Date() + 15
 Response.Cookies("auctionsession").Domain = ".oorahauction.org"

Then when they log out I try to delete the cookie this way
            response.Cookies("auctionsession") = ""
                         Response.Cookies("auctionsession").Expires = Date() -1
but my cookie isn't going away or clearing.
Am I missing something?
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note that 'Response.Cookies' MUST be done before any other non-ASP output.  You can Not set or delete a cookie after any page content has been sent.  It MUST be done before that.