There are plugins that can help you with this, but they aren’t foolproof. My suggestion is W3 Total Cache, you should be able to exclude necessary files from the cache from there. Your best solution, however is to do caching on the serverside level as you will see better performance that way.
Related Posts:
- wp_set_auth_cookie() doesn’t work in Ajax call
- Nonces and Cache
- AJAX vs Fragment Caching for W3 Total Cache [closed]
- WordPress Ajax Login without page reload
- Woocommerce Ajax Add cart not working
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- Caching-Plugins and Ajax-Page-Parts
- SSO autologin WordPress + Ajax
- Cache wp-json/posts without a plugin?
- How can I set cookies on both secure and non-secure origins at the same time?
- How to handle cookies from a WordPress plugin on a cached page?
- Cache plugins and ajax nonce verification
- Prevent AJAX caching from plugin
- Ajax login fails: script sets cookies, but is_user_logged_in() returns false
- admin-ajax.php 403 errors – no caching, permissions are fine
- Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC
- PHP cookie not set within AJAX call
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- Google Maps API throws “Uncaught ReferenceError: google is not defined” only when using AJAX
- Initialize TinyMCE editor / visual editor after AJAX insert
- Displaying PHP Errors from admin-ajax.php
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Is it safe to assume that a nonce may be validated more than once?
- Using Nonces for AJAX that only retrieves data
- store/cache ajax sent data to avoid repeated request
- Run again current query via ajax but changing a var
- Quick Edit: Selected Custom Taxonomy Not Refreshing After Save
- wp_verify_nonce always returns false when logged in as admin
- fetching via fetch/ajax gutenberg block data from third party
- Conditional action hooks
- Is it safe to use $_POST directly in my plugin instead of using admin-ajax.php to receive data from ajax?
- How to make get_theme_mod work with AJAX in the customizer preview
- How to check an ajax nonce in PHP
- admin-ajax.php slows down, but cant figure out which plugin
- Fatal error: Call to undefined function get_post() with ajax
- Convert this relative path to absolute
- Load WP content with ajax less server demanding and faster than normal page loading?
- WP Admin AJAX Security – using POST to include a relative URL
- Admin-ajax.php 400 error
- wp_create_nonce() in REST API makes user->ID zero
- Will setcookie work if there is a cache plugin installed?
- Plugin: AJAX query external API to sync to tables
- splitting the URL using jQuery
- How do I get reusable blocks via frontend REST API?
- AJAX Load more on CPT returning random posts
- WordPress admin-ajax.php not available for subscribers/contributors
- WP Ajax never returning any data / calling action
- get_queried_object_id in AJAX
- Should I check for privileges before hooking into `wp_ajax_$handle` or after?
- Refresh Markercluster after ajax call
- Mapping Backbone Models to serialized array in wp_options table
- WordPress Settings api data not sanitized if i use ajax
- Images loading over http instead of https
- Ajax login without redirect/reload
- wp_mail 200 response but no mail sent
- Ajax Request for both logged and non logged users
- Ajax Multi Response Problem
- AJAX call inside plugin class not triggering
- Custom AJAX Endpoint not returning any result
- Contact form 7 Hide response messages after 5 seconds
- WordPress Heartbeat API cannot parse data
- Ajax function on #publish only saves as draft – how to make it publish?
- AJAX call broken after actualization
- WP_Ajax Hook doesn’t execute this PHP code
- Ajax function not returning any results
- ajax problem – function on server is not called
- wp_mail doesn’t work when logged in?
- How to continuously send feedback via AJAX responses to my client?
- Need help with Access-Control-Allow-Origin
- Send email via ajax
- wp_ajax handler with multiple class instances
- admin-ajax.php (aborted) error when using jQuery.get
- Storing temporary data for a custom post type
- Load page HTML content through AJAX
- Not getting an ajax readystatechange on my page
- Display full WordPress post under search form using AJAX
- Ajax callback not work
- WordPress Select Option Load Custom Fields
- Add ajax to plugin in admin area
- Search live Ajax
- jQuery.post returns 0
- Ajax sometimes work and sometimes just don’t work
- admin-ajax error 400
- wordpress admin ajax trash_comment
- Javascript output now showing in custom widget
- Ajax call on class returns old data
- how to correctly use json_encode with ajax
- delete post meta data in array WordPress
- How to trigger lost password email using REST API?
- Display post thumbnail after clicking on post id with AJAX
- How to block search engines indexing certain AJAX actions
- Error while submitting form using AJAX and php
- How to fetch meta_value and meta_key in matrix after ajax request by post_id
- wp_ajax_action, wp_ajax_nopriv_action not working
- Is it a good idea to init ajax functions only while ‘DOING_AJAX’
- My website resets when accessing the index page
- Can’t access data from database using AJAX
- How to use Ajax with WordPress
- Using $.ajax getting 500 error
- contact form 7 form not working in admin panel