I've just been given a requirement to prevent browsers from saving data entered into specific form fields. It's been years since I've done web dev, and this is a relatively new capability. I was able to find the form field property autocomplete="off", but I can't seem to find any documentation indicating which browsers support it. Can anyone point me in the right direction of a chart of form attributes and browser compatibility?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Matter of fact, both username and password fields doesn't react to AutoComplete=off in all the latest browsers.
If you're able to use JavaScript and jQuery, you can place this on load of the html:
Be aware that all major browsers are moving towards ignoring the attribute for password fields.
I can only offer anecdotal evidence, but I've yet to come across a browser that fails to respect
autocomplete="off"
, this experience covers:I'm aware that Greasemonkey scripts, and presumably other user-scripts, can disable the
autocomplete
setting.There's a couple of articles I found that might be useful to you:
Password managers now ignore the
autocomplete
attribute forpassword
fields in the major browsers as of:It should still work fine for disabling
autocomplete
on form fields, but no longer affects the password manager.As of Chrome v34,
autocomplete="off"
is now ignored by default.This somewhat debatable feature can be disabled in the flags configuration by visiting
chrome://flags
http://news.softpedia.com/news/Chrome-34-Seeks-to-Save-All-Your-Passwords-436693.shtml
Some solution is not working in modern browsers.
Another solution link is given here. which works in all modern browsers.
Input type=password, don't let browser remember the password