• Resolved Mehedi

    (@imehedidip)


    When WP Super Cache is enabled, the REST API responses are broken on browsers. The actual responses are still functional, but the “frontend” looks broken:

    Disabling WP Super Cache makes the responses look like normal JSON responses, so it’s definitely a conflict caused by Super Cache or the REST API itself. Is there any workaround for this issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Maybe you solved it by yourself, but this is the workaround I just found out:

    1. Go to section “Accepted Filenames & Rejected URIs” which you can find in the advanced tab in WP Super Cache Settings.
    2. Add the string: “/wp-json/wp/v2/” without the quotes in the text area.
    3. Press the Save Strings button.

    Now it won’t try to get a cached version of a REST API endpoint.

    The alternative is to check the option “Don’t cache pages with GET parameters. (?x=y at the end of a url)”.

    Thread Starter Mehedi

    (@imehedidip)

    That fixed it, @cmtim! Thanks a lot!

    Thanks! It works!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘REST API conflicts with WP Super Cache’ is closed to new replies.