开发者

Disable text input history [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How do you disable browser Autocomplete on web form field / input tag?

I am building an application which will be accepting credit card data. I would like to make sure that the browser does not remember what has been typed into the text inputs for credit card number. I tried passing the following headers:

header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", fal开发者_如何学Gose);
header("Pragma: no-cache");

Still, once the page reloads, I can click the credit card text input field and it will let me see what I wrote in it before. How can I prevent this?


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

Should work. Alternatively, use:

<form autocomplete="off" … >

for the entire form (see this related question).


<input type="text" autocomplete="off" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜