I have a webpage that asks for a username and password. The problem is, it only asks the first time. After that, it bypasses that. This is an alert with a username and password place. How do I disable this saving feature so that it prompts every time the page loads.
Asked
Active
Viewed 164 times
0
-
You can use the Html attribute `autocomplete="off"`. infos : http://www.w3schools.com/tags/att_input_autocomplete.asp – NeoPix Jan 30 '15 at 19:17
-
@NeoPix, that is for saving username/password for forms, OP is asking about the http authentication dialog that the browser will display when accessing a webpage that requires authentication. – Patrick Evans Jan 30 '15 at 19:24
1 Answers
0
It should be noted that the desired functionality goes against the way in which HTTP basic authentication was designed to be implemented.
However there are a few ways in which you could automatically "log out" the user so that the next time the page is visited, the authentication dialog box will appear again, prompting the user for the username and password.
One way to accomplish this requirement would be with a JavaScript solution, checking if the user has been idle for a certain amount of time, and if so log out the user.
There are a number of solutions listed here, including a Javascript based solution: HTTP authentication logout via PHP