Disabling Autocomplete - HTML5

Overview

Some browsers have an "autocomplete" feature, where field values are suggested when the user starts typing. You may want to disable this feature, for example, for security reasons. This article explains how.

Solution

New to HTML5 is the autocomplete attribute, which has a value of either on or off. It can be used on either a form tag or an input tag, as follows.

<form ... autocomplete="off">
. . .
</form>

<form>

. . .
<input autocomplete="off" />
. . .
</form>