Take the 2-minute tour ×

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

6 Answers 6

In Firefox 3 you can choose Clear Recent History from the Tools menu (Ctrl + Shift + Del). You can then select to just clear Active Logins from the details to just clear those sessions.

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 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: http://user:pass@www.example.com/

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

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

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 at 16:42

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

Your Answer


