Advertisement
brasofilo

ySlow Upgrade

Oct 25th, 2011
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # If you're grading C or less in  Yahoo Yslow*, you can upgrade your score in about ten points using the following htaccess code
  2. # ( *install the Firefox or Chrome extension to run a performance test on the page you're viewing )
  3. #
  4. # INSTRUCTIONS
  5. # 1. Use a FTP client and download a copy of the file .htaccess located at the root of your site
  6. # 2. files starting with a dot are invisible, so make sure your client has the option "Show invisibles" active
  7. # 3. after downloading you're not gonna see the file using Windows Explorer or Mac Finder
  8. # 4. use the FTP client to rename your local copy (right clicking and selecting "Rename")
  9. # 5. after this the file is visible in your system and you can edit it with a text editor (**not MS Word**)
  10. # 6. paste the code bellow after the line that contains "#END WordPress"
  11. # 7. upload to your server (without the dot, so you not overwrite the original)
  12. # 8. in the server, rename the original to something else (f.ex.:  htaccess-backup)
  13. # 9. rename the new one and add a dot at the beginning
  14. # 10. in case of any problems, delete the new one and rename the old one back
  15. #
  16. # COPY THE CODE BELOW
  17. #
  18.     <Files *.css>
  19.     SetOutputFilter DEFLATE
  20.     </Files>
  21.  
  22.     <Files *.js>
  23.     SetOutputFilter DEFLATE
  24.     </Files>
  25.  
  26.     Header unset ETag
  27.     FileETag None
  28.  
  29.     #Expire Header
  30.     <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
  31.     Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
  32.     </FilesMatch>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement