http basic authentication “log out”

Update: This solution does not seem to work anymore in many browsers. Kaitsu’s comment:

This solution of sending false credentials to make browser forget the correct authenticated credentials doesn’t work in Chrome (16) and IE (9). Works in Firefox (9).

Actually you can implement a workaround by sending false credentials to the service. This works in Browsers by sending another (non-existent?) Username without a password. The Browser loses the information about the authenticated credentials.

Example: => Log in
with basic auth as “user1”

Now open

You’re Logged out. 😉


P.s.: But please test this with all needed Browsers before you rely on the given information.

Leave a Comment