禁止火狐浏览器缓存input标签
2013-11-07 18:26
281 查看
如果你想让Firefox没有这么智能,不缓存你的input的值的话,需要进行如下修改:
<form> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> <input autocomplete="off" type="text" /><br /> </form>
以上代码,给每一个input加上一个 autoconplete="off" 的属性,这样,就能阻止Firefox的默认缓存机制了。刷新之后,这些input的值都初始化。
还有一个写法,可以把全个表单中所有input都设置为不缓存的:
<form autocomplete="off"> <input type="text" /><br /> <input type="text" /><br /> <input type="text" /><br /> <input type="text" /><br /> </form>
http://www.mayax.net/article/program/331.htm
其他几种禁止浏览器缓存页面的方法:
1.在要禁止缓存的页面<head>中加以下脚本:
JSP代码
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0">
2.在要禁止缓存的页面<head>中加以下脚本:
JSP代码
<% response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", 0); %>
参考网址:
http://oldboy.iteye.com/blog/466595 ie和火狐缓存的区别
相关文章推荐
- 禁止火狐浏览器缓存input标签方法
- 禁止火狐浏览器缓存input标签
- 禁止火狐浏览器缓存input标签
- 禁止火狐浏览器缓存input的值
- 禁止firefox 缓存input
- input type=file 标签禁止让用户手动输入
- 禁止Firefox缓存input的值
- jsp input标签禁止输入空格方法
- input type=file 标签禁止让用户手动输入
- 禁止firefox 缓存input
- Input标签禁止粘贴
- html禁止清除input文本输入缓存
- html禁止清除input文本输入缓存
- meta标签设置禁止加载缓存及延伸
- html禁止清除input文本输入缓存
- input标签禁止让用户手动输入
- HTML禁止清除input文本框输入缓存
- [CSS] 去掉a标签超链接的虚线框,禁止浏览器默认input样式
- input标签禁止让用户手动输入