Title: Speed Boost Cache help needed
Last modified: August 21, 2016

---

# Speed Boost Cache help needed

 *  Resolved [liton1980](https://wordpress.org/support/users/liton1980/)
 * (@liton1980)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/)
 * After installing BulletProof Security and protecting .htaccess files using this
   plugin, i want to Speed Boost Cache using the provided code which is as below:
 *     ```
       # BEGIN WEBSITE SPEED BOOST
       # Time cheat sheet in seconds
       # A86400 = 1 day
       # A172800 = 2 days
       # A2419200 = 1 month
       # A4838400 = 2 months
       # A29030400 = 1 year
   
       # Test which ETag setting works best on your Host/Server/Website
       # with Firefox Firebug, Firephp and Yslow benchmark tests.
   
       # Create the ETag (entity tag) response header field
       #FileETag MTime Size
   
       # Remove the ETag (entity tag) response header field
       Header unset ETag
       FileETag none
   
       <IfModule mod_expires.c>
       ExpiresActive on
       ExpiresByType image/jpg A4838400
       ExpiresByType image/gif A4838400
       ExpiresByType image/jpg A4838400
       ExpiresByType image/png A4838400
       ExpiresByType application/x-shockwave-flash A4838400
       ExpiresByType application/x-javascript A4838400
       ExpiresByType application/javascript A4838400
       ExpiresByType text/javascript A4838400
       ExpiresByType text/css A4838400
       #ExpiresByType text/html A86400
       # Default is 2 days below so the line above is not needed / commented out
       ExpiresDefault A172800
       </IfModule>
   
       <IfModule mod_headers.c>
       <FilesMatch "\.(js|css|flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|gif|jpg|jpeg|png|swf)$">
       Header append Cache-Control "public"
       </FilesMatch>
       <FilesMatch "\.(txt|html)$">
       Header append Cache-Control "proxy-revalidate"
       </FilesMatch>
       <FilesMatch "\.(php|cgi|pl|htm|xml)$">
       Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
       Header set Pragma "no-cache"
       </FilesMatch>
       </IfModule>
   
       <IfModule mod_deflate.c>
       # Insert filters
       AddOutputFilterByType DEFLATE text/plain
       AddOutputFilterByType DEFLATE text/html
       AddOutputFilterByType DEFLATE text/xml
       AddOutputFilterByType DEFLATE text/css
       AddOutputFilterByType DEFLATE application/xml
       AddOutputFilterByType DEFLATE application/xhtml+xml
       AddOutputFilterByType DEFLATE application/rss+xml
       AddOutputFilterByType DEFLATE application/javascript
       AddOutputFilterByType DEFLATE application/x-javascript
       AddOutputFilterByType DEFLATE application/x-httpd-php
       AddOutputFilterByType DEFLATE application/x-httpd-fastphp
       AddOutputFilterByType DEFLATE image/svg+xml
   
       # Drop problematic browsers
       BrowserMatch ^Mozilla/4 gzip-only-text/html
       BrowserMatch ^Mozilla/4\.0[678] no-gzip
       BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
   
       # Make sure proxies don't deliver the wrong content
       Header append Vary User-Agent env=!dont-vary
       </IfModule>
       # END WEBSITE SPEED BOOST
       ```
   
 * I have read the page but i am confused that in which .htaccess file i should 
   paste it and in which line? above it? in the middle or where?
 * Currently i have 5 .htaccess files. In which of them i should paste above code?
   
   _secure.htaccess default.htaccess maintenance.htaccess wpadmin-secure.htaccess
   Your Current Root htaccess File Your Current wp-admin htaccess File
 * Also please tell me should i paste the provided code exactly as it is or i should
   change it?
 * [http://wordpress.org/plugins/bulletproof-security/](http://wordpress.org/plugins/bulletproof-security/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181170)
 * The steps to add the Speed Boost cache code are in the link below…
 * _1. Copy the Speed Boost .htaccess code into this Custom Code text box_…
 * Yes, you can use the code exactly as it is.
 * Source: [http://forum.ait-pro.com/forums/topic/htaccess-caching-code-speed-boost-cache-code/](http://forum.ait-pro.com/forums/topic/htaccess-caching-code-speed-boost-cache-code/)
 *  Thread Starter [liton1980](https://wordpress.org/support/users/liton1980/)
 * (@liton1980)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181211)
 * Thanks i did it. But i have just another question. Should i add custom code **
   immediately** after i installed BulletProof Security and then use abilities of
   this plugin or i can add Speed Boost cache code any time i want?
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181260)
 * You can add or remove custom code at any time using BPS Custom Code or if you
   want to manually edit .htaccess files you can manually edit them with the htaccess
   File Editor or if you want to download and edit .htaccess files and then upload
   them back to your site you can do that as well. The benefits of using BPS Custom
   Code are these:
 * Your custom code is saved permanently and will always be written/added to your
   htaccess files whenever you click the AutoMagic buttons and activate BulletProof
   Modes in the future.
 * You can edit your custom code directly in BPS Custom Code text boxes and the 
   format of the .htaccess code will be preserved/maintained to ensure that the .
   htaccess code format is valid.
 * Using the built-in BPS htaccess File Editor and BPS Custom Code ensures that 
   the formatting of the .htaccess code is the correct format.
 * **NOTE:** if you are going to edit .htaccess files on your computer you MUST 
   use either Notepad or Notepad++ – you CANNOT use Word, WordPad or any other word
   editing applications – they will corrupt the .htaccess code format and your website
   will crash if you use that .htaccess code.
 *  Thread Starter [liton1980](https://wordpress.org/support/users/liton1980/)
 * (@liton1980)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181270)
 * Thank you so much for your excellent support.
 *  [lukedouglas](https://wordpress.org/support/users/lukedouglas/)
 * (@lukedouglas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181457)
 * FYI, the ‘ExpiresByType’ for ‘jpg’ is listed twice so one should be ‘jpeg’. Also,
   it is set to 2 days which will hurt on YSlow scores so set it for 1 year as images
   don’t change often at all.
 * Change it to this:
 * ExpiresByType image/jpg A29030400
    ExpiresByType image/gif A29030400 ExpiresByType
   image/jpeg A29030400 ExpiresByType image/png A29030400
 * This improved by scores on multiple sites by more than 8 points.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181458)
 * Yep, we corrected that typo a while back.
    A4838400 = 2 months not 2 days. 😉
 *  [lukedouglas](https://wordpress.org/support/users/lukedouglas/)
 * (@lukedouglas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181459)
 * Actually, I set the image files to 1 month and 2 months but still got a significant
   hit on both scores. When I set it to 1 year, they went up significantly, especially
   YSlow.
 * I’m guessing that Yahoo feels there is no need to have less than a 1 year setting
   for image files as they are ‘rarely’ changed, only removed or replaced. From 
   my experience of creating and maintaining over 120+ websites for the past 12+
   years professionally, I have to agree with them as I rarely ‘replace’ image files
   with the same identical name.
 * So I see no reason ‘not’ to set them at 1 year.
 * Just my two cents.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181460)
 * I think YSlow is a great tool and use it regularly so don’t get me wrong here,
   but there are several YSlow suggestions that I typically ignore. The most important
   thing is that your website is actually performing as fast as it possibly can.
   I think browsers will dump cache long before a year passes so basically you are
   making YSlow happy, but it would not make any difference as far as an actual 
   speed increase for your website is concerned.
 * [https://developers.google.com/speed/docs/best-practices/caching](https://developers.google.com/speed/docs/best-practices/caching)
 *  [lukedouglas](https://wordpress.org/support/users/lukedouglas/)
 * (@lukedouglas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181461)
 * Oh! I agree that you don’t have to take some of the suggestions on either the
   PageSpeed or YSlow analysis just like we don’t have to with the W3C HTML Validation
   or CSS Validation tools. The only reason I follow this particular suggestion 
   is strictly for scoring as I provide a PDF report to clients just to let them
   know I’m doing my job. It doesn’t hurt a thing to set image files to 1 year versus
   2 months but it will gain you a few points.
 * FYI, I’ve had more than a handful of clients that wondered why their sites didn’t
   rank 100% on all of the tests as if that was the end game goals. I’ve had to 
   educate them on the fallacy of online testing tools. 🙂
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181462)
 * Yep, I agree and hear ya about what client’s think matters. My favorite one is“
   my website does not rank #1 when searching for my domain name. How are people
   going to find my products and services”. LOL And yes I know you have answered
   this same question a million times. 😉

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Speed Boost Cache help needed’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

## Tags

 * [Boost](https://wordpress.org/support/topic-tag/boost/)
 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [speed](https://wordpress.org/support/topic-tag/speed/)

 * 10 replies
 * 3 participants
 * Last reply from: [AITpro](https://wordpress.org/support/users/aitpro/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/speed-boost-cache-help-needed/#post-4181462)
 * Status: resolved