Windows Phone 7 (WP7) requests to force refresh of the same HTTP address multiple times in a short time

Source: Internet
Author: User

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 ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.