使用时间戳解决ie缓存的问题


在开发测试中,如果选择ie,当编辑某条数据时,再回过头来进行编辑,会发现,里面的数据和没有编辑以前是一样的, 这和种情况下,解决ie缓存成了问题。我的方法是,在请求链接后面加上一个时间戳,就只可以避免这种问题的出现。

复制代码 代码如下:

var getTimestamp=new Date().getTime(); //时间戳
var _url = "${pageContext.request.contextPath}/productData/addShow.do?productDataId="+value+"&timer=" + getTimestamp;


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3