Disable Chrome form autocomplete

Google Chrome ignores the autocomplete=”off” or automcomplete=”false” in forms.

At the time of the writing the following did the trick. You set the input field to a readonly state and remove the attribute after loading the page.

Why a timeout?

If you try to remove the readonly on document ready it will not work on Chrome. Also, if you use the on focus event, the iPad keyboard will not show up.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*