Wamp, appche leverage browser caching

Source: Internet
Author: User
Load the expires and headers modules in httpd. conf, and then add the following Code :

<Ifmodule mod_expires.c>
Expiresactive on

# Perhaps better to whitelist expires rules? Perhaps.
Expiresdefault "access plus 1 month"

# Cache. appcache needs re-requests in FF 3.6 (THX Remy ~ Introducing HTML5)
Expiresbytype text/cache-manifest "access plus 0 seconds"

# Your document html
Expiresbytype text/html "access plus 600 seconds"

# Data
Expiresbytype text/XML "access plus 600 seconds"
Expiresbytype application/XML "access plus 600 seconds"
Expiresbytype application/JSON "access plus 0 seconds"

# RSS Feed
Expiresbytype application/RSS + XML "access plus 1 hour"

# Favicon (cannot be renamed)
Expiresbytype image/X-icon "access plus 1 week"

# Media: images, video, audio
Expiresbytype image/GIF "access plus 1 month"
Expiresbytype image/PNG "access plus 1 month"
Expiresbytype image/jpg "access plus 1 month"
Expiresbytype image/JPEG "access plus 1 month"
Expiresbytype image/X-icon "access plus 1 month"
Expiresbytype video/Ogg "access plus 1 month"
Expiresbytype audio/Ogg "access plus 1 month"
Expiresbytype video/MP4 "access plus 1 month"
Expiresbytype video/webm "access plus 1 month"


# HTC files (css3pie)
Expiresbytype text/X-component "access plus 1 month"

# Webfonts
Expiresbytype Font/TrueType "access plus 1 month"
Expiresbytype Font/OpenType "access plus 1 month"
Expiresbytype application/X-font-woff "access plus 1 month"
Expiresbytype image/SVG + XML "access plus 1 month"
Expiresbytype application/vnd. MS-fontobject "access plus 1 month"

# CSS and JavaScript
Expiresbytype text/CSS "access plus 1 year"
Expiresbytype application/JavaScript "access plus 1 year"
Expiresbytype text/JavaScript "access plus 1 year"

<Ifmodule mod_headers.c>
Header append cache-control "public"
</Ifmodule>

</Ifmodule>

Specific time limits can be tailored to individual needs.

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.