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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Suggestion: modify htaccess file to speed up your site


Go to End


3401 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 - Yslow 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