Add expires headers on your website and enhance load speed

Creare a .htaccess file with following lines and upload to your website root folder.


ExpiresActive on

# Your document html
ExpiresByType text/html "access plus 0 seconds"

# Media: images, video, audio
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"

# CSS and JavaScript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"

Check using Yslow or Page speed.

  • raahsalah

    Its will be good if you add more stuffs about to minimize page load time

  • admin

    Good stuffs