Javascript-cache-control setting CSS Force cache invalidation

Source: Internet
Author: User

I want to force my a.css file to be cached.
The way I use it is to modify Apcache's httpd.conf. The code is as follows:

LoadModule headers_module modules/mod_headers.soheader set cache-control "max-age=1000"

Debug Discovery Cache-control is set up correctly:

But it still doesn't work:

Ideally, it should return 200, then size is from cache.

Baffled ...

Reply content:

I want to force my a.css file to be cached.
The way I use it is to modify Apcache's httpd.conf. The code is as follows:

LoadModule headers_module modules/mod_headers.soheader set cache-control "max-age=1000"

Debug Discovery Cache-control is set up correctly:

But it still doesn't work:

Ideally, it should return 200, then size is from cache.

Baffled ...

Refresh the action is not the same result will be different, you compare:

Address bar Enter: read cache from disk cache with browser cache
f5/ctrl+r: In any case, it will be requested by the browser and returned 304 if the resource does not expire
Ctrl+f5: In any case will request to the browser, forcing the return of resources200

Thank you, you right-click on the Chrome Refresh button. You can also see the status upstairs.

  • 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.