How to prevent browser cache of credit card number fields

I have an input field on a webpage containing a credit card number. What is the best way to prevent the browser from caching this value?

Any solution should work with a large selection of browsers.

+6
credit-card
source share
2 answers

Put the autocomplete="off" attribute in the html form. For example.

 <form name="form1" id="form1" method="post" autocomplete="off" action="http://www.example.com/form.cgi"> [...] </form> 

See page .

+8
source share
 <asp:TextBox Runat="server" ID="Textbox1" autocomplete="off"></asp:TextBox> 
+4
source share

All Articles