Browsers rarely make it easy to log out of a site once you've logged on with HTTP Basic authentication. How can I do this?
(This form of authentication is rarely used on the public web, but the intranet I'm on uses it all the time. It's the one where you get a pop-up dialog asking you for a username and password.)
4 Answers
For most browsers
Log in with a nonsense user using the address bar. For example, if you logged on to and loaded the URL , enter this:
For Chrome
This used to worked on Chrome, but no longer. There might not be a complete solution, but see and for some discussion.
3For chrome browser you can restart the chrome application completely by typing in the address bar.
chrome://restartAnother way is that, always open the browser in incognito mode. For chrome the shortcut is
ctrl + shift + nAnother way you can try it out is that, try to give wrong credentials if you want to logout. Say,
randometxt@localhost:3000*sometimes, this works.
From the answer
You have the following options on Chrome
chrome://restart
Launch in incognito mode
Enter the wrong username in the url without the resources
eg: if the url is , it will not work if I enter , but will work if I enter only
- it clears the Basic Auth credentials
- prompt for the credentials again
- However, entering the valid credentials will not work, as in the background, chrome still send the wrong user as part of the url, even though the url appears right in the address bar When prompted for credentials you would need to
Cancel, and click the address bar and reload the page from pressingenter. Now enter the correct password
In Firefox, go to Preferences -> Privacy & Security -> Clear history, then select only "Active logins" checkbox, (optionally choose appropriate time period) and click "OK".
(This will log you out of all sites you are logged in with HTTP Basic auth. There's no official method to log out of one site only)