WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Super Cache + JSON (3 posts)

  1. jdfcafe
    Member
    Posted 3 years ago #

    Hi,

    I installed WP Super Cache. It works fine except for one case.

    Let's say I have a special page that gathers some information about some posts and outputs them in JSON (array of JSON objects). That page (e.g. mydomain.com/regulations/ch4/) is used by some other websites that get and execute its content as JavaScript (jQuery.ajax() with dataType set to 'script'). Unfortunately, such requests don't create a cached version of this page.

    I looked into the code of SuperCache and found out that it examines wp pages and looks for certain tags. If it finds them, it creates their cache version. So I added
    //</html>
    to workaround this (but I honestly hate this solution), and it started generating cached versions when the url was accessed from the browser, but not from jQuery.ajax() :/

    Any ideas?

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. jdfcafe
    Member
    Posted 3 years ago #

    Nobody?

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    You're right about why this isn't working. It's to stop half generated pages being cached. I'm not sure why it's not being cached when called from the ajax command. Did you try the debug system in the plugin?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic