Problem description: If a Weibo client is being developed, one function is to follow someone. When the user does not follow someone, click the follow button and the server returns "follow successful ", click the follow button again (if the page is not refreshed in time due to "follow successful"), the server returns "you have followed this user ". In ourProgram. The problem occurs. During the debugging process, click the follow button multiple times in a short period of time. The received server return value is "follow successful", and "you have followed this user" is not displayed as scheduled ".
Problem Analysis: there is no problem on the server side, so the problem is on the client side. Later, I finally confirmed the problem as "cache "......
Tip: Add "& _ t =" + datetime. Now. ticks. tostring () to the request URL. If there is no parameter in the URL, add "? _ T = "+ datetime. now. ticks. tostring (), because the time of each request is different, the request URL is artificially different. This method is commonly used by many Ajax developers, everyone knows how to pass values through get ~