Title: Leverage Browser Caching
Last modified: February 24, 2021

---

# Leverage Browser Caching

 *  Resolved [shereew](https://wordpress.org/support/users/shereewalker/)
 * (@shereewalker)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/leverage-browser-caching-79/)
 * Hi there
 * I would like to use these settings in .htaccess as it renders better results –(
   the code under ‘for Apache Servers’)
 * [https://gtmetrix.com/serve-static-assets-with-an-efficient-cache-policy.html](https://gtmetrix.com/serve-static-assets-with-an-efficient-cache-policy.html)
 * Is there any way to disable this in WP optimize so it does not insert it’s own
   settings in the .htaccess file or customise it – or can I just delete the following
   code and replace it..
 * # BEGIN WP-Optimize Browser Cache
    <IfModule mod_expires.c> ExpiresActive On 
   ExpiresByType text/css “access 28 days” ExpiresByType text/html “access 28 days”
   ExpiresByType image/gif “access 28 days” ExpiresByType image/png “access 28 days”
   ExpiresByType image/jpg “access 28 days” ExpiresByType image/jpeg “access 28 
   days” ExpiresByType image/webp “access 28 days” ExpiresByType image/x-icon “access
   28 days” ExpiresByType application/pdf “access 28 days” ExpiresByType application/
   javascript “access 28 days” ExpiresByType text/x-javascript “access 28 days” 
   ExpiresByType application/x-shockwave-flash “access 28 days” ExpiresDefault “
   access 28 days” </IfModule>
 * <IfModule mod_headers.c>
    <filesMatch “\.(ico|jpe?g|png|gif|webp|swf)$”> Header
   set Cache-Control “public” </filesMatch> <filesMatch “\.(css)$”> Header set Cache-
   Control “public” </filesMatch> <filesMatch “\.(js)$”> Header set Cache-Control“
   private” </filesMatch> <filesMatch “\.(x?html?|php)$”> Header set Cache-Control“
   private, must-revalidate” </filesMatch> </IfModule>
 * #Disable ETag
    FileETag None # END WP-Optimize Browser Cache`
 * Thanks!
    SHeree

Viewing 1 replies (of 1 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/leverage-browser-caching-79/#post-14104121)
 * [@shereewalker](https://wordpress.org/support/users/shereewalker/) Yes you can
   replace the code generated by WP-Optimize.

Viewing 1 replies (of 1 total)

The topic ‘Leverage Browser Caching’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Harshad](https://wordpress.org/support/users/bornforphp/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/leverage-browser-caching-79/#post-14104121)
 * Status: resolved