Among them, the first question, in the article "XMLHttpRequest object" has been resolved;
For the second problem, the reason is:
A GET request accesses the cache every time, to see if there is a matching URL, and if so, returns the URL in the cache and, if not, makes a request to the server.
Solution:
1. Add a dynamic change parameter to the URL in order to each access a different URL, so that each time a new request is made to the server.
For the third problem, we first look at the cause of garbled:
XMLHTTP the data returned by default is Uft-8, if the client page is gb2312 or other encoding, it will produce garbled
Solution:
1. If the client is gb2312, specify the output stream encoding at the time of output
2. Utf-8 encoding is used on both the client and server side
3. Be sure to encode the parameters using the encodeURIComponent method
Take a look at the example: