This period of time before and after the end of the joint, to solve the browser compatibility issues ie, Google, is really a bit of a burn, a variety of wonderful problems, the old problems just go, new trouble, especially in IE browser cache problems most. There are several times because of this cache, so that the front-end request does not actually reach the background, resulting in 304 status code.
After the front-end colleagues and my various attempts, found that there are three or four ways to solve this problem in different situations.
method One:On the Internet a search "HTML settings are not cached"You will see most of the answers are this, that is, in a previous post," with the front end of the joint in the Pit (ii) "also said that the method is not working at the time, in the HTML request, add the following code:
<meta http-equiv= "Pragma" content= "No-cache" ><meta http-equiv= "Cache-control" content= "No-cache" >< Meta http-equiv= "Expires" content= "0" >
This method did not work last time, but it has played a role in some of the previous applications.
Method Two:because the above method one in the last time the union failed, and then after several attempts to find another method, it is also the "joint with the front end of the Pit (ii)" said the GET request changed to a POST request, this is not much to say. If you join a friend who has failed the method, you may try it.
Method Three:Although the method to solve the problem of the last time, but today in another module encountered similar problems, but helpless to find, not only method one failure, method two unexpectedly also failed. So a toss, again find a new solution, that is in the request for the corresponding background code to add the following:
Response.setheader ("Cache-control", "No-cache"); Response.setheader ("Pragma", "No-cache"); Response.setdateheader ( "Expires",-1);
method Four:As for method four, it is actually the same problem that was encountered in the solution three, the effect is similar, that is, when the request is a GET request is, after the URL to add a variable parameter value, for example: http://localhost:8080/test?time=123456, In this way, the browser will always think of a new request, it would really go to the background.
According to front-end colleagues, there should be another method five, is to add a piece of code in angular's httpserver, because it is said that some trouble, so there is no more understanding.
Several solutions to the failure of Internet Explorer to send requests to the back end due to cache problems