ajax get request caching issues

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);
Published 114 original articles · won praise 8 · views 5500

Guess you like

Origin blog.csdn.net/OVO_LQ_Start/article/details/104667038