Contional Logic referer not recognised

Hi, i am a bit of a newbie so apologies if this is basic… but would appreciate some pointers on areas to understand better

i have created conditional logic on the referer so that text module only appears if come from specific page.

it is tempremental though. on my android phone and in edge browser on desktop, it doesn’t work. in chrome in desktop, whilst logged into wp-admin, it does work.

if you want to see for yourself the conditional message is “you came here from /job-functions/reserving-actuary/”

Route to see item:
start on: https://cjpaine.co.uk/job-functions/reserving-actuary/
then click link to for “ORSA”

Route to NOT see item:
start on https://cjpaine.co.uk/149-2/
then click link to for “ORSA”

the conditional logic is
referer contains /job-functions/reserving-actuary/

Thanks in advance for any suggestions.

You want the page to be dynamic, but its being cached twice

1 Like

thank you for your response …

i have been reading for several hours to increase knowledge on this and have detailed some steps below in case it is of use to anyone.

this article helped me understand cahing:

I don’t know whether the issue is server side caching or client side caching that is causing the problem.

i also wasn’t sure what “caching twice” problem mentioned earlier is referring to exactly. (server AND client caching perhaps?)

the following article explained to me in simple terms why page caching is not good for dynamic pages on wordpress sites:

i therefore installed the W3 total cache plugin and diabled page cache and purged the cache. butthis didn’t solve the problem. (i assume this is server side stuff)

i therefore went to browser cache and disabled that and purged the cache. (i assume this is client side stuff). the browser cache settings look far more complicated with many more options.

again didn’t solve the problem… although site is slower now (i think possible due to a photo that has to be reloaded each time on the home page)

i will keep reading although i am disappointed. After purchasing beaver themer for conditional logic functionality i naively thought it was going to be straightforwards to build dynamic content but it isn’t…

Your host is using endurance page caching, if you view the source of you page and scroll down you will see it adds a message to every page.

The cached page is then cached at the server level, you can see that in the network tab of your browser…

So its essentially cached twice, you wont be able to do what you need unless you do one of the following:

  • Disable caching altogether
  • Disable the cache for that one page
  • Do what you need in javascript so its clientside.
1 Like

thanks again for you help.

i have disabled cache for that specific page, and repeatedly purge the cache, but it is still not operating the conditional logic as required.

i will keep investigating and post if i find the answer

Now its cached by w3cache and the server cache. You should stick to the cache plugin provided by your host, I doubt w3 cache can talk to the server side caching.

1 Like

thanks for you help… the problem is now solved.

w3cache is the recommended plugin by my host wpx. I contacted them and downloaded their recommended settings for the plugin. i disabled caching for that page and disabled browser caching and purged all caches. but this didn’t work.

I contacted the host again and they advised that they can turn off caching on the server their end. a step i hadn’t realised was necessary/possible. i also asked them to turn off caching from their CDN.

All of this was new to me… so i hope it is of some use to other newbies who find that conditional logic doesn’t work due to caching… for me, it has solved the problem.