Asp. NET page in IE Cache removal method _ Practical skills

Source: Internet
Author: User

Did not notice this problem before, today in the blog to find a good article, perhaps later, it is worth learning:

Typically, a Web page has a temporary file in the Temporary Internet folder.
This happens when I'm working with IE:
If there is a page page1.aspx, after my first visit, it will have a page1.aspx file build in my Temporary Internet folder. After that, if I change the page1.aspx data and then visit the page again, Found that IE did not update the page1.aspx data, but opened the page I first visited. Why is this, because IE automatically (default) calls the Internet temporary folder has a page1.aspx file, Instead of downloading the new page1.aspx.
How can you let ie automatically download new page1.aspx?
One way to do this is to set up Internet options.
Internet Options--> The "settings" in the general-->internet temporary file--> check each time you visit this page.
This setting is best to delete temporary files at the same time.
This approach is to allow the customer to set up their own browser, if the customer forgot to set up, then the new page will always download the local. What do customers think? ("It must be the program's fault!") In fact, it is not a program's fault, but the program can solve the problem completely.
The second way: to use the program to automatically download the page.
This method actually lets the page not be saved to the Temporary Internet folder, and the browser downloads the page each time the page is accessed.
Just add in the Page_Load event of the Aspx.cs code

Context.Response.Cache.SetCacheability (Httpcacheability.nocache);

Can.

You can try. When you open the page without adding this sentence, you will have a paging file in the Internet Temp folder

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.