Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make Firefox "invalidate" it's saved HTTP Basic Auth credentials for a website from the client side?

Currently, I have to restart the browser, which is rather cumbersome with multiple tabs open.

Is there a way to do this without having to restart Firefox/clear the cache/etc.

share|improve this question

You can choose Clear Recent History from the History menu (Ctrl + Shift + Del, Macs: Cmd ⌘ + Shift + Del). You can then select to just clear Active Logins from the details to just clear those sessions.

In older versions of Firefox (such as FF3), Clear Recent History is under the Tools menu. The shortcut is the same.

share|improve this answer
In the current Firefox, this menu option is in the History menu, not Tools. I verified this with Firefox 29.0.1. – Mei May 20 '14 at 16:13

If you change username and password from the original session to one which will not authenticate, Firefox will destroy all reference to the old authentication and attempt the new one.

You can change/set authentication by adding user:pass@ to the beginning of the URL, example:

If you are logged into with user:pass then typing (adding to the beginning of the address) anything@ will cause this to happen, example:

A fast fix which doesn't require any plugins.

Please note this only works for HTTP Basic Auth.

An additional side benefit is this will affect only the website you are interacting with. All other logins to any other website will remain active.

share|improve this answer
This is an awesome answer. Simple, easy-to-use, no additional software required, and clever in a non-obviously obvious sort of way. – wfaulk Mar 19 '13 at 16:30
On a side note, this should work with most other browsers also, including Chrome and Internet Explorer (IE) – Drew Anderson Sep 19 '13 at 8:51

The Web Developer toolbar allows HTTP authentication to be reset within a browser session.

From Firefox's Context Menu, choose Web Developer -> Miscellaneous -> Clear Private Data -> HTTP Authentication.

share|improve this answer
Can't find this on current Firefox – Scolytus Feb 12 '15 at 7:44
Unfortunately, that feature seems to have disappeared at some point since I posted this answer. – boot13 Feb 12 '15 at 13:25

there is no way for the website to offer a log out option

This is wrong. There are several and simple ways for the website to offer a logout options.

1) Logout link will point to a URL on the same domain containing credentials that are intentionally incorrect

2) Logout link will trigger javascript with following code snippet (Microsoft Internet Explorer only):

<script>document.execCommand('ClearAuthenticationCache', 'false');</script>
share|improve this answer
there doesn't seem to be a way to reliably invalidates credentials that behaves consistently across browses and doesn't pop up an unwanted login box. – Michael Dec 16 '14 at 16:42
Logout link using incorrect credentials is already covered in another answer – Dmitry Grigoryev Oct 2 '15 at 22:54

Not sure if this will help anyone else, but in my case i thought that it was a bad password that firefox was storing when i couldn't access a site with basic HTTP authentication. But it turns out that site was actually using NTLMv1 (windows version of basic http authentication) which firefox has now disabled by default since version 30.

To enable go to about:config, and set the pref network.negotiate-auth.allow-insecure-ntlm-v1 to True.

Firefox does not prompt for password for http authenticated sites, how to make it prompt?

share|improve this answer

The easiest way is to log out from the site instead of just closing the tab. If this is not an option and you know before hand you will be visiting a site you want forgotten you can install Sandboxie and run your Firefox (or any browser) in a sandbox. Delete the contents of the sandbox when done and everything you have done is gone.

share|improve this answer
HTTP authentication is a special type of HTTP header that causes your web browser to prompt you for a user name and password, then re-send it automatically when it's needed. When a website uses this type of authentication, there is no way for the website to offer a log out option. In most browsers, you have to close the browser for it to forget your login information. – Bavi_H Aug 28 '10 at 2:19
@Bavi_H: I've heard that some browsers will forget existing sessions if the site sends a HTTP 401 while logged in. – grawity Oct 11 '11 at 17:46
Just clearing site cookies do not invalidate saved username and password for basic authentication. – Petr Gladkikh Aug 28 '12 at 4:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .