Reputation: 616
I want to make an Input field secure, so enforced autocomplete off.
1)But intelligent user using modern browsers can edit webpage dynamically and enable autocomplete on. (f12)
What is the best way to accomplish my Task. Client script won't solve my solution?
Any ideas and solutions would be appreciated. Thanks.
Upvotes: 1
Views: 268
Reputation: 133
Please try following option in your html instead of autocomplete="off"
<input type="text" name="firstName" autocomplete="new-password"/>
This is working fine for me, Please try this solution.
Upvotes: 0
Reputation: 219894
You can't stop it. You don't have enough control over the browser or the user to effectively stop someone who doesn't want to be stopped. The best you can use is the tools you have (turning autocomplete off, some JavaScript, etc) and keep the number of users who bypass this to a minimum, but not zero.
Not to mention, this really is down to user choice. If they want to have an autofill for their browser, that's their call. If they want to make it very simple to put sensitive information into a web form so be it. The same goes for enabling JavaScript, stylesheets, screen resolution, etc.
Upvotes: 3