Cache problem get requests
get request cached, it can reduce pressure on the server running. But it will affect the normal operation of the program. The problem of information and database mismatch occurs.
solution
A time stamp may be added in the transmission path.
var time = new Date().getTime();
xhr.open("GET","User.do?_=time&username="+username,true);