Disable the client cache of the aspx page (to prevent the page from being modified)

Source: Internet
Author: User

By default, IE opens a webpage and caches it locally to reduce the number of server accesses and improve performance. But sometimes this also brings us drawbacks, such as modifying the page of information, opening the page again after submitting the repair and modification, because the URL has not changed, so IE will read the local cache, the page displays the original information, which is easy to appear in the pop-up dialog box or window for modification.
In ASP. NET, you can add the following content to the page:
Copy codeThe Code is as follows:
<% @ OutputCache Location = "None" VaryByParam = "None" %>

Or
Add the HEAD part of HTML
Copy codeThe Code is as follows:
<! -- Disable the cache part to start -->
<Meta http-equiv = "Expires" content = "0"/>
<Meta http-equiv = "Progma" content = "no-cache"/>
<Meta http-equiv = "cache-control" content = "no-cache, must-revalidate"/>
<! -- Disable the cache part to end -->

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.