0

Can someone provide me with an optimize .htaccess configuration that handles compression, browser caching, proxy caching, etc. for a typical website?

Aside from my visitors, I'm also trying to make Google PageSpeed happy.

StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441

1 Answers1

1

I have the following in a yslow_optimizations.conf file I include into my apache conf files, I think they should work Ok in an .htaccess file too:

# disable ETags                                                                            
FileETag none                                                                                       

# GZip css, js                                                                                      
AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript              

# set expires into the future                                                                       
ExpiresActive on                                                                                    
ExpiresDefault "access plus 1 month"                                                                

There's more that could be added to it I'm sure, but it's a start.

Tom
  • 42,844
  • 35
  • 95
  • 101