Turning autocomplete off in form development

Recently I ran into an issue where the browsers “auto complete form” feature was butting heads with some “auto suggest” functionality we were developing.

There are two main solutions that I was able to find regarding the problem. One was based in javascipt and the other using an html attribute. The challenge is that the attribute was created by Microsoft and thus is considered invalid (and yet other browsers have adopted it).

Using the attribute is pretty simple, just add autocomplete=”off” and your input tag and you’re golden.

<input type="text" autocomplete="off" />

I’ll be using this method for now and while I might eventually opt for a javascript solution, this method creates the smallest total footprint to make things work.

This entry was posted in Development and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>