It turns out this is due to SiteGround caching data, in particular its Dynamic Cache. According to their docs on Dynamic Cache, they will “… monitor whether your browser has these cookies and bypass the cache if they are present”.
One of the cookies they check against is wordpress_logged_in_, which explains the behaviour I described. When I flushed this cache manually, the new posts were fetched as desired.
It’s unclear whether this has anything to do with filemtime, perhaps it’s mere coincidence.
I tried searching for ways to programmatically purge the Dynamic Cache (on post save hooks, for example), but couldn’t find any useful information. So, the easiest solution by far was to install the SiteGround CachePress plugin, which takes care of all cache types that can be found in the SiteGround site tools.
Related Posts:
- Using Backbone with the WordPress AJAX API
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Nonces and Cache
- Including WordPress in RESTful API
- REST API endpoint for elasticpress autosuggest
- AJAX vs Fragment Caching for W3 Total Cache [closed]
- Gutenberg – how to correctly perform ajax request on backend
- AJAX request from Chrome Extension to WordPress Website
- WP REST API route request explain
- Confused on AJAX submit form through page template
- Solve cors problem using rest api or ajax
- Is there a hook to process a backbone restful PUT request inside wordpress?
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- How to add WP API and JS featured image attachment
- how to send Ajax request in wordpress backend
- Identical wp_rest nonce returned from rest_api
- Caching-Plugins and Ajax-Page-Parts
- How do I get reusable blocks via frontend REST API?
- Is there builtin way to use protected AJAX endpoint?
- rest_no_route custom route
- Test WordPress api with postman
- How to load content from many posts on a page, only if needed
- How do I query posts by a sub value with the API?
- Cache wp-json/posts without a plugin?
- merge wp rest api query to get posts per category does not work
- Ways to load admin-ajax faster without initializing all plugins?
- Cache plugins and ajax nonce verification
- How to make a fetch() POST request to wordpress rest api?
- post values to custom post type which has advanced custom fields
- Prevent AJAX caching from plugin
- REST public POST giving 403 forbidden nginx
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- 404 error custom post type rest api
- admin-ajax.php 403 errors – no caching, permissions are fine
- How to require files in a custom endpoint
- Create a post with REST API and adding a category
- Should I edit a user meta field with PUT, PATCH, or POST and WP::Editable
- How to trigger lost password email using REST API?
- Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC
- Caching for logged in user and Ajax update
- how reduce fetch/XHR response time
- Custom WP rest api endpoint only working on non https?
- How to submit a button automatically after every scheduled hours?
- WordPress REST API FormData: Form Not Submitted When No Files Attached
- register_rest_route to send via ajax as guest results to 403
- MySQL select query with ajax
- Exposing data using a custom WordPress API
- Use WP admin AJAX url to hide API key
- Get response for check_ajax_referer
- WordPress ajax-action how to return content
- Custom Login with Ajax not working with IE
- AJAX jQuery post frontend returning failed to load resource status 400
- 400 Bad Request when sending XHR from React.js to admin-ajax.php
- How to check nonce lifetime value of plugins?
- How can I wp_send_json data?
- Making POST request with AJAX returns a 400 error (without jQuery)
- Front end theme options ajax returns 0
- Load image src through Ajax by ID?
- Using get_theme_mod in php ajax form doesn’t work
- PHP session when called wp_ajax_nopriv
- What exactly does ‘authenticated’ mean for wp_ajax_nopriv?
- Use AJAX in a WordPress Plugin to Get Data From Custom Database?
- Custom RPC end-point security best pratice?
- AJAX – SHORTINIT set to TRUE returns blank
- How to use Jeditable plugin with admin-ajax.php?
- Ajax mousedown call getting “cancelled” when clicking link
- WordPress Ajax Not Firing
- Get uploaded attachment width & height and attachment ID after upload them
- Disabling ajax code that does a POST request that ends in a 400 error code
- Refresh checkout fields on add to cart with order bump
- Add Server Side validation in Ajax mail form
- How to prevent my external API call from being called by anyone but me (my site)
- Ajax not sending the data correctly- Multidimensional array
- get a bad request 400 on my ajax-admin.php file
- Registration form AJAX check for existing username (simple version)
- How to check Ajax request only when i opened the Notifications list?
- All WordPress AJAX calls always return 0
- Syntax error on query_vars while handling with Jquery
- Want to send ajax request in wordpress to a custom file in plugin
- How to send the checkbox value to email
- how to get password from user instead wp-generate-password
- Class called in template, AJAX not registering
- Same query in category.php and in function.php, but different result
- Sending email with wp_email and AJAX
- How to use nonces for frontend AJAX voting if the page gets cached?
- AJAX Call in Plugin Returns More than JSON
- Ajax take too long to return code
- problem when adding wp_editor with ajax [duplicate]
- Get wp-load.php PATH with wp_localize_script and JavaScript for plugin
- Ajax Form seems to post, but does not return
- Ajax request to admin-ajax.php and window.location.href
- Objects and get_post_meta() gives me 1 string for latitude and longitude
- Memberpress isn’t cooperating with WooCommerce
- where does my function output from load-* go?
- WordPress ajax requst returns zero
- wp_editor() in content that was loaded with ajax [duplicate]
- WordPress blocking polling request when signed into Admin
- Facebook Pixel + WooCommerce + AJAX = Confusion
- Send button using own contact form [closed]
- wordpress Ajax success doesn’t return the value