Another solution I found was to disable the field, which makes the autocomplete not work in any browser (I tested it in Chrome, FF and IE).
Then just enable the field when the form is loaded, because at this point the browser will no longer fill in the fields:
<input type="email" id="email" disabled="disabled" />
And in the Javascript
, after loading the document, enable the field. In this example, using jQuery
:
// Esperar o documento carregar
$(document).ready(function () {
// Usando um pequeno delay de 100ms porque às vezes o navegador preenche o campo logo que o documento está pronto, e pode não funcionar como esperado
setTimeout(function(){
$('#email').removeAttr('disabled');
}, 100);
});
http://jsfiddle.net/jmn2d213/2/. Dude, you don’t have to repeat the fields. That’s the biggest scam I’ve ever seen in HTML. Put
autocomplete="off"
on the tag<form>
. See Link in Jsfiddle.– Diego Souza