Title: Cache-Control
Last modified: August 2, 2018

---

# Cache-Control

 *  Resolved [newwper3](https://wordpress.org/support/users/newwper3/)
 * (@newwper3)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/)
 * Hi,
 * Does ninjafirewall affect cache-control?
    Because my caching rules in htaccess
   doesn’t work

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

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10550506)
 * Hi,
 * Normally, it doesn’t because your .htaccess is processed before PHP (and NinjaFirewall).
   
   Can you post your rules here, and also give more details about how did you notice
   they don’t work.
 *  Thread Starter [newwper3](https://wordpress.org/support/users/newwper3/)
 * (@newwper3)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10550763)
 * Hi,
 * ## EXPIRES CACHING ##
    <IfModule mod_expires.c> ExpiresActive on ExpiresDefault“
   access plus 1 day” ExpiresByType image/jpg “access plus 1 month” ExpiresByType
   image/jpeg “access plus 1 month” ExpiresByType image/gif “access plus 1 month”
   ExpiresByType image/png “access plus 1 month” ExpiresByType text/css “access 
   plus 7 days” ExpiresByType application/pdf “access plus 7 days” ExpiresByType
   text/javascript “access plus 7 days” ExpiresByType application/x-shockwave-flash“
   access plus 7 days” ExpiresByType image/x-icon “access plus 1 month” ExpiresByType
   x-font/woff “access plus 1 month” </IfModule> ## EXPIRES HEADER CACHING ##
 *  Thread Starter [newwper3](https://wordpress.org/support/users/newwper3/)
 * (@newwper3)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10551254)
 * Hi,
    For example, I’m using [Breeze](https://wordpress.org/plugins/breeze/) as
   my cache plugin
 * Before I install Ninjafirewall the website showing [IMG1](https://imgur.com/a/bpIuwW8)
 * But after installing Ninjafirewall the Browser Cache does’t work anymore
    [IMG2](https://imgur.com/a/gQmp6p8)
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10551971)
 * Upgrade to the new NinjaFirewall version 3.6.7 which was released today and try
   your test again. There was a small issue in the 3.6.6 which may be the reason
   why you get those results.
 *  Thread Starter [newwper3](https://wordpress.org/support/users/newwper3/)
 * (@newwper3)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10552078)
 * Hi,
 * The problem still exists 🙁
 * Is Ninjafirewall does’t work with HTTP / HTML cache?
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10552194)
 * It works for me. This is what I get with and without NF when I use your rules:
 *     ```
       $ curl -I http://192.168.43.101/
       HTTP/1.1 200 OK
       Date: Thu, 02 Aug 2018 17:56:55 GMT
       Server: Apache/2.4.25 (Debian)
       Link: <http://192.168.43.101/wp-json/>; rel="https://api.w.org/"
       X-XSS-Protection: 1; mode=block
       Cache-Control: max-age=2592000
       Expires: Sat, 01 Sep 2018 17:56:55 GMT
       Content-Type: text/html; charset=UTF-8
       ```
   
 * Make sure to use a command line tool like `curl` or, if you test from a browser,
   either delete your cookies or restart your browser because as a WordPress admin,
   you still have a PHP session cookie (which was used when your were logged in)
   and that will fail the test.
 *  Thread Starter [newwper3](https://wordpress.org/support/users/newwper3/)
 * (@newwper3)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10552305)
 * I see.
 * One more question.
    Is it possible to disable PHP session cookie, because if 
   using Cloudflare cache everything rule, Cloudflare will cache login users pages
   and login cookies.
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10554401)
 * It is not possible to disable it because it is used to whitelist the admin as
   well as the access to the login page. But Cloudflare should not cache your admin
   dashboard, the login page and cookies, because that would be a security risk.

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

The topic ‘Cache-Control’ is closed to new replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/cache-control-2/#post-10554401)
 * Status: resolved