Home  >  Article  >  Web Front-end  >  Use timestamps to solve IE cache problems_javascript tips

Use timestamps to solve IE cache problems_javascript tips

WBOY
WBOYOriginal
2016-05-16 16:39:041193browse

In the development test, if you choose IE, when editing a certain piece of data, and then go back to edit, you will find that the data inside is the same as before without editing. In this case, the problem of IE caching is solved. problem. My method is to add a timestamp after the request link to avoid this problem.

Copy code The code is as follows:

var getTimestamp=new Date().getTime(); //Timestamp
var _url = "${pageContext.request.contextPath}/productData/addShow.do?productDataId=" value "&timer=" getTimestamp;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn