• Hi there,

    A user of my plugin has noted that my script is being cached by WP Super cache, and giving that output rather than my REST API endpoint JSON.

    What we’re seeing is:

    false
    <!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->

    (Rather than the JSON)

    Do you know how I can exclude this from being cached?

    The script is enqueued via wp_enqueue_script().

    I’m aware that users can exclude my script on a site-by-site basis, but we have hundreds of users, so being able to put something into my code and know that WP Super Cache will not cache it on all users’ sites would be great 🙂

    Thanks,

  • The topic ‘Exclude enqueued script from caching’ is closed to new replies.