0

I have tried all sorts of workarounds that I could find here and googling around and none have seemed to work on all the common browsers(Chrome, IE, Safari, FireFox).

Tried setting autocomplete="off", autocomplete="random", autocomplete="new-password" on the input. Tried changing input type to text and using css to obscure, worked in chrome only. Tried adding hidden dummy fields which didnt work in any browsers.

Anyone have any other ideas or tested workarounds, thanks.

GVoid
  • 1

2 Answers2

0

Have you tried this?

How to prevent a browser from storing password

The accepted answer there is

<input type="text" name="UserName" autocomplete="off" readonly 
onfocus="this.removeAttribute('readonly');" >

<input type="password" name="Password" autocomplete="off" readonly 
onfocus="this.removeAttribute('readonly');" >

This might help perhaps?

Parth Manaktala
  • 554
  • 5
  • 18
  • Tried doesnt work on chrome v66, safari 11, firefox 60 – GVoid May 17 '18 at 14:27
  • https://stackoverflow.com/q/2530/8107504 Check this. This page says generating a random name of the form field everytime you open a page. This might help. – Parth Manaktala May 17 '18 at 14:33
  • dont have access to server-side form processing so just stripped the random parts of the name on submit however that did not work either. – GVoid May 17 '18 at 15:35
0

None of the solutions I've found at this day provide a real working response.

So, this is what I wrote for myself:

<input type="text" name="UserName" onkeyup="if (this.value.length > 0)
this.setAttribute('type', 'password'); else this.setAttribute('type', 'text');" >

You should do this for every input field you want as password type on your page.

Azametzin
  • 4,342
  • 12
  • 22
  • 38
Patrick
  • 61
  • 4