http://www.perlmonks.org?node_id=180724


in reply to Logoff/ReLogin to htaccess in one browser

I gave up looking for solutions to this problem, once I moved over to using more complicated authentication (my current back end intrinsically allows a prived user to pretend to be a lesser one) So as you'd expect, a solution prevented itself late one night shortly after.

What you need to do is force your webserver to report a 401 error (authentication required) This is the same as it normally reports when you try to access a protected directory, and your browser should then assume the credentials it previously supplied are no longer correct, and prompt you for username and password.

I suggested this to a friend having similar difficulties finding how to do it, and he reckons it works just peachy, except for a bug in one version of IE5.

the hatter