Quantcast
Channel: EasyPHP and Modules : WordPress, Spip, Prestashop, Joomla, Drupal, phpBB, Phorum...
Viewing all articles
Browse latest Browse all 171

Setting up browsercaching (no replies)

$
0
0
Hello I am using a .htaccess on a Windows 7 machine for browsercaching. The file works fine online, but on my testserver it doesn't. Can some tell me how I can setup EasyPHP to work with the .htaccess file




###########HTTP HEADER START###############
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>
# Set up caching on media files for 1 week
<FilesMatch "\.(gif|jpg|jpeg|png|swf)$">
ExpiresDefault A604800
Header append Cache-Control "public"
</FilesMatch>
# Set up 2 Hour caching on commonly updated files
<FilesMatch "\.(xml|txt|html|js|css)$">
ExpiresDefault A604800
Header append Cache-Control "proxy-revalidate"
</FilesMatch>
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl|htm)$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
###########HTTP HEADER END###############

Viewing all articles
Browse latest Browse all 171

Trending Articles