Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Suggestion: modify htaccess file to speed up your site


Reply


2482 Views

Avatar
Val

7 Posts

6 October 2007 at 7:37pm

Edited: 06/10/2007 7:39pm

A friend of mine suggested that I would check my site using new Yahoo tool - [url=http://developer.yahoo.com/yslow/]Yslow[/url] to check how my site is performing. One would need to download firebug and YSlow extensions for Firefox.

After performing a mini-audit and about 5 min of searching Google, I've found out that the site could be slightly optimize by adding the following to the htaccess file


SetOutputFilter DEFLATE
FileETag none
ExpiresActive On
ExpiresByType text/css "access plus 4 weeks"
ExpiresByType image/jpeg "access plus 4 weeks"
ExpiresByType image/gif "access plus 4 weeks"
ExpiresByType text/javascript "access plus 4 weeks"

SetOutputFilter DEFLATE - would allow for GZIP compression (http://doc.silverstripe.com/doku.php?id=server-requirements&s=deflate)

FileETag none - would take care of entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser's cache matches the one on the origin server.

ExpiresByType - would take care of expires header for given content. You can configure header to expired in any period of time (days, weeks, month, year)

I hope it'll help someone