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 our program, each time a user clicks the Follow button, the same operation is actually executed, that is, an Http request is initiated. Because the get method is used, if the operation is the same, the requested url is also the same. 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 ~