Title: Contact form 7 Shortcode and Cloudflare Automatic Platform Optimization
Last modified: August 1, 2021

---

# Contact form 7 Shortcode and Cloudflare Automatic Platform Optimization

 *  Resolved [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [5 years ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/)
 * until a time a ago was working fine, now is not detect anymore the correct country,
   have any ideea why?
    i don’t know if is from plugin or from cloudflare. check
   [this](https://www.getreskilled.com/certificate-in-validation/apply/) page.
 * thank you

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

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14569955)
 * Are you using AJAX mode? AJAX mode should be page cache safe.
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14570105)
 * should be eneble only: “Enable AJAX endpoint to get the information for the current
   IP even on cached pages.”
    or also some sub-settings from ajax?
 * ps: i’m using css classes and also in cf7 the shortcode
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14570492)
 * Also the sub-settings …
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14570514)
 * this [link](https://www.getreskilled.com/iq-oq-pq/apply/) display your correct
   country in form?
 * ps: until now i was using tunnelbear to change location and test, and everthig
   was fine, now after i activated the cloudflare APO ony if i use: “Empty cache
   and hard reload” display the correct one.
 * From this reasons i don’t understand anymore if works well all the time.
 * Thank you
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14570958)
 * No idea how APO works.
    Would it be an option to use the cloudflare CDN as datasource?
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14570974)
 * Oh the help says, I can add the following header to disable APO for the AJAX 
   requests:
 * header( ‘cf-edge-cache: no-cache’ )
 * I will add it to beta and let you know.
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14571160)
 * sure, thank you
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14573352)
 * It’s released as 4.2.0-beta6 now …
 * [https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing](https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing)
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14573820)
 * great, i will give s try and come back to you
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14573968)
 * now is on beta, is [here](https://www.getreskilled.com/certificate-in-validation/apply/)
   the correct country for you?
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14574578)
 * for nothing is change if i use or not ajax, same results
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14576157)
 * No it’s not correct yet …
    Did you purge the APO cache after installing the new
   version?
 *  Thread Starter [Marius](https://wordpress.org/support/users/mmichtus/)
 * (@mmichtus)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14576706)
 * yes, should “Add a country-specific CSS class to the <body>-Tag on every page”
   be check if allready is: “Add a country-specific CSS class to the <body>-Tag (
   via AJAX)” ?
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14577645)
 * Now it shows the right country, and the AJAX request has the header “cf-cache-
   status: bypass”, that’s correct.
 * When testing, it’s important to use private mode or clear all cookies, because
   the result of the detected country is cached in the user’s browser (by default
   for one week).
 * These two options do 2 different things. If you use AJAX mode, you only need 
   the latter option, and it adds the body class on every page where the frontend
   JS is loaded. Basically the sub-options are there to fine-tune performance, checking
   them all should be the default (I should change that for new installs).

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

The topic ‘Contact form 7 Shortcode and Cloudflare Automatic Platform Optimization’
is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 14 replies
 * 3 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/contact-form-7-shortcode-and-cloudflare-automatic-platform-optimization/#post-14577645)
 * Status: resolved