Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Suggestion: modify htaccess file to speed up your site

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

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

Page: 1
Go to End
Author Topic: 2436 Views
  • Val
    7 Posts

    Suggestion: modify htaccess file to speed up your site Link to this post

    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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.