Cache Conflict with Wordpress Ajax Requests

So when I do log in, not from wp-admin
it is custom theme login modal
so it uses AJAX POST request so I found that it requests to:
https://mydomain.com/wp-admin/admin-ajax.php?action=login&nonce=d3sfce9524
so when the page reloads it gets
cache-control
no-cache, must-revalidate, max-age=0
cf-cache-status
EXPIRED
sometimes cf-cache-status: HIT
So, my question is I have a page and there modal popups and requests for login after that they can enroll in courses so for enrolling there is a Continue button (appears after login)
So continue button not appearing because sometimes cache HIT, or Expired so
any Cache-Control Config Suggestion or anything to Fix it?

Methods i did:
Done PageRules /wp-admin/ cache bypass.
Done PageRules /wp-admin/* cache bypass.

Did you specify a wildcard after /wp-admin/ ?

It should be /wp-admin/*

done this also

are you 100% sure it’s being cached? filter your cache analytic stats for that request path and see the cache status returned i.e.

i think cache performance not available for free versions

1 Like

Ah yes Cache Analytics if for paid plans - though $20/month for Pro is worth every penny :smiley:

You can try using browser dev tools/network tab with preserve log enabled and go through your login routine and see all requests made and inspect their headers

image

1 Like

cache-control
max-age=31536000
cf-cache-status
HIT
cf-ray
5fa26dbe489ca74f-KTM
cf-request-id
06b962eaea0000a74f9ba9a000000001
content-encoding
br
content-type
text/html; charset=UTF-8
date
Mon, 30 Nov 2020 06:14:31 GMT
expect-ct
max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct

As i see how this theme modal works…
if login successful it reload the page saving cookies.
so when reloading this status HITS

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.