I remember i used to add a piece of code the HTML text input field so that no previous entries menu drops down anymore whenever you visit the page again and type in the same field… can you please remind me what to be added to the input tag? many thanks…
There’s a non-standard attribute (can’t remember the name) that works in some browsers, but overriding such built-in features is not a good idea. Especially not if it requires invalid markup.
There is a nonstandard attribute, autocomplete=“off”, that you can use to disable this. Your page won’t validate if you use this. It only works because online banking sites pressured browser makers into supporting this attribute.
The move is toward giving the browser owner more control of how their browser works and so it is likely that browsers will soon offer an option to turn that off in the web page for those who want their browser to make the suggestions on what the field might contain. Just about every other option that web pages can ask to turn off can now be turned back on by the browser owner so leaving out that one is an anomaly that should soon be rectified.
Had a thought a few minutes ago about a more standards-compliant way of doing this.
You could generate a random string using a server-side language of your choice and set that as the name attribute of the input field for which you don’t want autocomplete to detect.
You’ll also need to set the same string as the value attribute of a hidden field which would also be passed to your form handling script.
The script could then grab the value of the hidden field to get the name of the text field. Does this make sense?