How do you delete all the cookies for the current domain using JavaScript?
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.
Note that this code has two limitations:
HttpOnlyflag set, as theHttpOnlyflag disables Javascript’s access to the cookie.Pathvalue. (This is despite the fact that those cookies will appear indocument.cookie, but you can’t delete it without specifying the samePathvalue with which it was set.)