Support » Plugin: Geolocation IP Detection » Contact form 7 Shortcode and Cloudflare Automatic Platform Optimization

  • Resolved Marius

    (@mmichtus)


    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 page.

    thank you

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Benjamin Pick

    (@benjamin4)

    Are you using AJAX mode? AJAX mode should be page cache safe.

    Thread Starter Marius

    (@mmichtus)

    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

    Plugin Author Benjamin Pick

    (@benjamin4)

    Also the sub-settings …

    Thread Starter Marius

    (@mmichtus)

    this link 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

    Plugin Author Benjamin Pick

    (@benjamin4)

    No idea how APO works.
    Would it be an option to use the cloudflare CDN as datasource?

    Plugin Author Benjamin Pick

    (@benjamin4)

    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

    (@mmichtus)

    sure, thank you

    Plugin Author Benjamin Pick

    (@benjamin4)

    It’s released as 4.2.0-beta6 now …

    https://github.com/yellowtree/geoip-detect/wiki/Beta-Testing

    Thread Starter Marius

    (@mmichtus)

    great, i will give s try and come back to you

    Thread Starter Marius

    (@mmichtus)

    now is on beta, is here the correct country for you?

    Thread Starter Marius

    (@mmichtus)

    for nothing is change if i use or not ajax, same results

    Plugin Author Benjamin Pick

    (@benjamin4)

    No it’s not correct yet …
    Did you purge the APO cache after installing the new version?

    Thread Starter Marius

    (@mmichtus)

    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)” ?

    Plugin Author Benjamin Pick

    (@benjamin4)

    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.