Howto logout from basic HTTP Authentication

Matthias Meyer matthias.meyer at gmx.li
Sun Nov 29 18:15:10 GMT 2009


Hi,

I really now, logout from a basic HTTP authentication is not possible (many
people said).
But that is not true. It is possible. I found a solution which will work for
IE as well as Firefox/Iceweasel (http://www.nanodocumet.com).


How the solution work for Mozilla/Firefox?
I have a html page which contains Javascript:

  if (agt.indexOf("mozilla") != -1) {
    var xmlhttp = createXMLObject();
    xmlhttp.open("GET",".logout_mozilla",true,"logout","");
    xmlhttp.send("");
    xmlhttp.abort();

and a .htaccess which contains:

  <Files .logout_mozilla>
  AuthType Basic
  AuthName "Backup4U"
  AuthUserFile /etc/backuppc/htpasswd
  Require valid-user
  </Files>

The User "logout" is not within my /etc/backuppc/htpasswd. Therefore Mozilla
will get a 401 and the browser will ask for username/password if the page
will be accessed again.

Unfortunately that do not work for Mozilla/Konqueror.
Any hint how to get Konqueror to forgot his credentials?

Thanks in advance
Matthias
-- 
Don't Panic





More information about the kfm-devel mailing list