Welcome to aegis hosting

Our Support Portal puts you in control of your account with us. Manage your hosting packages, servers and domains. Keep track of support issues, orders and billing.

Support Portal

Using Expires Headers to improve performance

Adding an Expires header to your website with a date in the future makes the files cacheable, reducing the load time of your pages. This should be done with images, but that's fairly typical. Go a step further and add it to scripts and stylesheets, too. This won't affect performance the first time users hit your page, but on subsequent page views it could reduce response times by 50% or more.

Here's an example configuration for your .htaccess file enabling Expires headers on common file types.

 

# Set long expire headers for better browser caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 30 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType application/x-javascript "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType image/x-icon "access plus 7 days"
ExpiresByType image/vnd.microsoft.icon "access plus 7 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType application/x-shockwave-flash "access plus 30 days"
</IfModule>



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
High Server Load (Views: 248)
Installing APC (Views: 78)