How to disable autocomplete for a HTML password field in IE11?

后端 未结 5 1516
日久生厌
日久生厌 2020-12-09 06:10

IE11 dropped support for autocomplete=off for input type=password at both the form and element level.

Has anybody found a working solution

5条回答
  •  [愿得一人]
    2020-12-09 06:56

    I'm a bit late to this, but the cleanest approach (at the time of writing) seems to be making users submit their username and password in different pages, i.e. the user enters their username, submit, then enters their password and submit. The Bank Of America and HSBC Bank websites are using this, too.

    Because the browser is unable to associate the password with a username, it will not offer to store passwords. This approach works in all major browsers (at the time of writing) and will function properly without the use of Javascript. The downsides are that it would be more troublesome for the user, and would take 2 postbacks for a login action instead of one, so it really depends on how secure your website needs to be.

    PS: Firefox will be following IE11's lead and ignore autocomplete="off" for password fields, as per this 'bug report' which is marked VERIFIED FIXED.

提交回复
热议问题