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
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
No idea how APO works.
Would it be an option to use the cloudflare CDN as datasource?
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)
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
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)” ?
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).