How to clear ASP. NET pages in IE Cache

Source: Internet
Author: User

I have not noticed this problem before. I found a good article during my Blog reading today. It may be worth using for reference in the future:

Generally, WEB pages have a temporary file in the Temporary Internet folder.
This problem occurs when I operate IE:
Assume that there is a page Page1.aspx. After my first visit, it will generate a Page1.aspx file in my temporary Internet folder. after that, if I changed the Page1.aspx data and accessed the page again, I found that IE did not update the Page1.aspx data, but opened the page I visited for the first time. this is because IE automatically (by default) calls a Page1.aspx file in the Temporary Internet folder instead of downloading the new Page1.aspx.
How can I enable IE to automatically re-download the new Page1.aspx?
One way is to set Internet Options.
Internet Options --> General --> "Settings" in Temporary Internet Files --> check every time you access this page.
In this setting, it is best to delete temporary files at the same time.
This method allows the customer to set their own browsers. If the customer forgets the settings, the new page will never be downloaded locally. What does the customer think? ("It must be a program error! "In fact, it is not a program error, but it can be completely solved by the Program)
Method 2: Use a program to automatically download the page.
In this way, the page is not saved to the Temporary Internet folder. Every time you access the page, the browser downloads the page.
In the Page_Load event of the aspx. cs code, add

Context. Response. Cache. SetCacheability (HttpCacheability. NoCache );

You can.

If you do not add this sentence, you can open the page. There will be a page file in the Temporary Internet folder.

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.