Speed up your Website

The webbrowsers' and server's default configuration usually enables some reasonable use of the browser cache. The case is different if you discover not enough 304 HTTP responses which indicate use of the browser cache. Just take control over the mechanism then and experiment with the following .htaccess configuration snippet.

Add Browsercache Directives to .htaccess

# Take Control of the HTTP Expiration Headers and disable ETags

ExpiresActive On
FileETag None
Header unset ETag
ExpiresDefault "access plus 1 week"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"

Of course you can adjust the cache duration to your own liking. Just change the number and time unit, e.g. to 2 years.

Switch to German Content

This website provides supplementary information, tips, links and coding examples for the acclaimed German Joomla Handbuch.

Sponsors