Answer the question
In order to leave comments, you need to log in
How to logout with httpOnly cookies?
httpOnly cookies cannot be deleted on the client, only by a request to the server.
And how then to do a logout if the user, for example, pressed the logout button while being offline?
Answer the question
In order to leave comments, you need to log in
You can create regular cookies in which you will store the login=1 field, which you can safely delete offline and give the user an authorization page the next time the server is accessed. Also, in cases of XSS attacks, the maximum that can be done is to log out the user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question