I encountered a problem in the project. Under Firefox, $.getJSON(); requested data and everything was normal, but under IE, $.getJSON(); only requested data once, and the second time it failed at all. The request is no longer sent. I found out after using fiddler to capture it. The request was not sent the second time and it was normal after I changed it to post
$.getJSON() has a caching problem. If the url it calls has been called before, the callback function will directly obtain the desired value in the cache instead of entering the background
The solution is as follows:
1. Make the URL different each time it is called.
Method: Add a random number to the parameter
Using new Date() can also be regarded as a random URL
2. Set cache to false