SoFunction
Updated on 2025-04-05

Solve the problem that the page is not refreshed after data is updated in IE11 vue +webpack project

The page has no refresh problem after the data is updated in the vue +webpack project. Under ie11, if the GET requests the same URL, the cached data from the previous request will be used by default, and the latest data will not be obtained from the request interface. The solution I used is to intercept the request and add a timestamp to the URL of the request interface before each request is sent (new Date().getTime()). This ensures that the URL of each request is different, and ie11 will constantly request the interface without using cached data.

The code is as follows

 if(('?')>-1){
    = url +  +"&timestamp="+getTimestamp;
   }else{
    = url + +"?timestamp="+getTimestamp;
   }

The above article solves the problem that the page has not been refreshed after data update in the IE11 vue + webpack project is all the content I have shared with you. I hope you can give you a reference and I hope you can support me more.