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.