如何防止浏览器缓存信用卡号字段 [英] How to prevent the credit-card number field being cached by the browser

查看:77
本文介绍了如何防止浏览器缓存信用卡号字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在包含信用卡号的网页上有一个输入字段。防止浏览器缓存此值的最佳方法是什么?

I have an input field on a webpage that contains a credit-card number. What is the best way of preventing the browser from caching this value?

任何解决方案都需要在多种浏览器上工作。

Any solution needs to work on a large selection of browsers.

推荐答案

将属性 autocomplete = off 放入HTML表单。例如,

Put attribute autocomplete="off" to your html form. E.g.

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

请参阅此页面

这篇关于如何防止浏览器缓存信用卡号字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆