Use timestamp to solve the problem of ie cache and timestamp to solve ie Cache
In development and testing, if you select ie, When you edit a piece of data, you will find that the data in it is the same as before, in this case, the ie cache is solved. My method is to add a timestamp after the request link to avoid this problem.
Copy codeThe Code is as follows:
Var getTimestamp = new Date (). getTime (); // Timestamp
Var _ url = "$ {pageContext. request. contextPath}/productData/addShow. do? ProductDataId = "+ value +" & timer = "+ getTimestamp;
How to clear browser cache with EXTJS
Generally, timestamp is added. If you still execute it only once, it depends on your code logic. After timestamp is added, there will be no cache problems.
High score: js cache problems, urgent
Because of the IE cache, we always use IE cache when entering the same value. To solve this problem, you can use the following method:
1: Add a timestamp after the url submitted by ajax or dwr.
For example
Http_request.onreadystatechange = funcName (function name );
Http_request.open ("GET", url, true );
For example, the url is test. jsp.
So we add it after it? Time = new Date ();
Url = test. jsp? Time = new Date ();
2: Add a random number to the url.
.........
Url = test. jsp? Number = Math. random ();
Because the time and the number of requests are submitted once and changed once, each submission is not the same, and it will be executed as a new request.