0

I have a password-protected Apache web directory I'm testing. When I first access the directory, it requires that I login in. However, on subsequent tries it let's me right in, even after I clear my browser cache- how do I get it to force a login again?

Yarin
  • 173,523
  • 149
  • 402
  • 512

2 Answers2

1

The browser stores the credentials and sends them along with every request - usually, for the duration of the current session.

Closing the browser and re-opening it makes it usually forget the credentials.

Forcing the browser to forget credentials (i.e. logging out) is tricky. See HTTP authentication logout via PHP for some approaches.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
1

Easiest way I've found:

Using Firefox 4 on Mac,

  1. Go to 'Tools' > 'Clear Recent History...' > 'Active Logins'
  2. Refresh the page (You don't have to close the window)
Yarin
  • 173,523
  • 149
  • 402
  • 512