To set HTML and JSP pages without caching methods

Source: Internet
Author: User

HTTP header information expires tells the proxy server when its cached pages will expire.

The newly defined header information in the HTTP1.1 specification Cache-control can inform the browser not to cache any pages.

Basic methods for using Cache-control:

1) No-cache: Force cache to fetch new pages from the server
2) No-store: Cache does not save any pages in any environment

For HTML pages, join:

 <  meta  HTTP-EQUIV  = "Pragma"  " Span style= "color: #0000ff;" >= "No-cache"  >  <  meta  http-equiv  = "Cache-control"   CONTENT   >  meta  http-equiv  = "Expires"  Span style= "color: #ff0000;" > CONTENT  = "0"  >  

For JSP pages, join:

    <%          response.setheader ("Cache-control", "No-store");          Response.setheader ("Pragrma", "No-cache");          Response.setdateheader ("Expires", 0);       %>  

To set HTML and JSP pages without caching methods

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.