Specified as file header expires or Cache-control

Source: Internet
Author: User

Cache-control :private,no-cache,must-revalidate,max-age

Expires Specify page expiration time  

Response . setContentType ("Charset=utf-8");

Response . SetHeader ("Pragma","No-cache");

Response . SetHeader ("Cache-control","No-cache");

Response . Setdateheader ("Expires", 0);

Web content design is now more and more abundant. This means that there are many other scripts, stylesheets, pictures, and flash that are included in the page.

Users who visit your page for the first time will mean making multiple http requests. However, this content can be cached by using the expires file header. It avoids the unnecessary http request in the next page access question. The

expires file header is used frequently in image files, but should be used in all of the content. Includes scripts, style sheets, and flash wait.

copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Specified as file header expires or Cache-control

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.