Enable cache for the entire site of MVC to relieve the request pressure on the server

Source: Internet
Author: User

= Url = extension = (! TimeSpan (, DateTime. UtcNow. AddYears (). ToUniversalTime (). ToString (

The advantage of this is that after a user visits the website for the first time, the cache header will be added to images, scripts, styles, and other static resources. As long as the user does not clear local resources, the browser will automatically determine the validity period of these static resources. If the validity period is not like the request initiated by the server, the request pressure on the cache server will be. However, each time a static resource is updated, the version number must be added to the end to inform the browser that this is a new resource. You should request the server, otherwise, the user will still see the old resource instead of the updated resource.

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.