Title: Getting HTTP response code
Last modified: August 21, 2016

---

# Getting HTTP response code

 *  Resolved [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/getting-http-response-code-urgent/)
 * Hi Wordfence, I have a problem with your plugin. I have developed a cache plugin
   for wordpress ([wp fastest cache](http://wordpress.org/support/plugin/wp-fastest-cache)).
   My and your plugin cannot work together.
 * Problem; When “If anyone’s requests exceed:” is set, “Your access to this site
   has been limited” page is shown and this error page is cached.
 * Fix; I need to get header of page. if(httpStatus == 503){ //not cache } , I will
   do something like that. Can you help me about it? How can I detect the header
   of page?
 * [http://wordpress.org/plugins/wordfence/](http://wordpress.org/plugins/wordfence/)

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

 *  Plugin Author [Mark Maunder](https://wordpress.org/support/users/mmaunder/)
 * (@mmaunder)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/getting-http-response-code-urgent/#post-4236583)
 * Hi Emre,
 * In your code you can check if we have set DONOTCACHEPAGE, DONOTCACHEDB, DONOTCDN
   or DONOTCACHEOBJECT. We set these to indicate to other plugins like WP total 
   cache to not cache pages. The actual code in Wordfence is as follows:
 *     ```
       public static function doNotCache(){
                       header("Cache-Control: no-cache, must-revalidate");
                       header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); //In the past
                       define('DONOTCACHEPAGE', true);
                       define('DONOTCACHEDB', true);
                       define('DONOTCDN', true);
                       define('DONOTCACHEOBJECT', true);
   
               }
       ```
   
 *  Thread Starter [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/getting-http-response-code-urgent/#post-4236592)
 * Thank you so much 🙂 I have implemented it and WP Fastest Cache works wirg Wordfence
   properly

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

The topic ‘Getting HTTP response code’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/getting-http-response-code-urgent/#post-4236592)
 * Status: resolved