Prevent browser autocomplete [duplicate]

3

Is there a way to prevent, through code, the browser from making suggestions for filling in the login form?

Is that the system will be used in laboratories and would be annoying the browser to suggest all previously registered CPF. In addition there is an ugly yellow background when the dice come from suggestion. See

I use JSF + primefaces, and even with the autocomplete off in inputText, it seems to be useless!

    
asked by anonymous 22.02.2018 / 19:40

2 answers

1

You can do it like this

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

Autocomplete documentation: link

    
22.02.2018 / 19:45
2

The firstfaces itself has an autocomplete tag so instead of putting the autocomplete="off" of the html, you can take advantage of the own primefaces tag using autocomplete="false" as per the documentation.

Reference - link

Example:

<p:inputText type="text" autocomplete="false" ... />
    
22.02.2018 / 20:10