How to speed up your site using .htaccess
How to speed up your site using .htaccess – Edit content (add a revision)
In this tutorial you will find out how to speed up your site with only some minor changes to your .htaccess file == Enable file caching == Enable caching of files on the client-side (inside the browser). [code,apache] ------ Header unset Pragma FileETag None Header unset ETag # cache images/pdf docs for 10 days <FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$"> Header set Cache-Control "max-age=864000, public, must-revalidate" Header unset Last-Modified </FilesMatch> # cache html/htm/xml/txt diles for 2 days <FilesMatch "\.(html|htm|xml|txt|xsl)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch> ------ For more details, see tutorial:Apache+enable+file+caching+with+htaccess[How to enable file caching with .htaccess in Apache] == Compress JavaScript and style-sheet files == [code,apache] ------ <IfModule mod_deflate.c> <FilesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> ------
Save as new Revision
Syntax docs