Title: WPRocket JavaScript Deferred Issue
Last modified: October 31, 2025

---

# WPRocket JavaScript Deferred Issue

 *  Resolved [mspringer4](https://wordpress.org/support/users/mspringer4/)
 * (@mspringer4)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/)
 * When using EventKoi with WPRocket, activating the “Load JavaScript Deferred” 
   WPRocket option breaks the API call that fetches the body of the calendar. Adding
   the EventKoi JS file paths to the WPRocket exception list does not resolve the
   issue. 
   To recreate the issue have both plugins installed. Under WPRocket > File
   Optimization turn on “Load JavaScript Deferred”. Log out and visit a page where
   you have the calendar shortcode installed or the …/calendar/your-calendar-slug/
   page that the plugin creates. The calendar will only display gray placeholder
   blocks and the browser console shows a JS error of `Failed to load resource: 
   the server responded with a status of 404` and an error saying `Failed to load
   initial calendar`

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18703194)
 * Hi, Thank you for the detailed support request and for letting us know exactly
   how to recreate the issue.
 * I have gotten in touch with WPRocket for a copy of their plugin so that we can
   troubleshoot this issue. Depending on their reply, we might also attempt to solve
   the issue by using WPRocket’s documentation on [Load JavaScript Deferred](https://docs.wp-rocket.me/article/1265-load-javascript-deferred),
   but would then need your help to test and see if the issue is resolved.
 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18707617)
 * Hi, I was finally able to get a license from the WPRocket team and attempted 
   to replicate the bug you mentioned but was unable to do so.
 * Here are the steps I took:
    1. Installed EventKoi Lite (v1.0.13) and WPRocket (v3.20.0.3) in a brand new instawp
       site
    2. Navigated to WPRocket Settings
    3. Checked the Load JavaScript Deferred option and saved changes
    4. Opened up a calendar using the calendar page created, as well as created a new
       post and added a calendar shortcode.
    5. Both default calendar page and new post with shortcode were able to load the
       calendar with no issues.
 * Here’s a short video demonstrating this: [https://share.cleanshot.com/1dmzQ472](https://share.cleanshot.com/1dmzQ472)
 * Are you able to try again on your end to see if the problem is still occurring?
   I’ll mark this as closed for now, but if you still encountering this issue, please
   reply and share additional information if possible.
 * Thank you!
 * Lesley
 *  Thread Starter [mspringer4](https://wordpress.org/support/users/mspringer4/)
 * (@mspringer4)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18738500)
 * The problem is still occurring on my end. Based on that recording it looks like
   you were still logged in when you went to view the calendar. This issue only 
   occurs for non-logged-in users. Hope that helps!
 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18740586)
 * Hi! Thanks for reaching back out.
 * I just tried it after logging out and was still able to load the calendar.
 * I suspect the issue is caused elsewhere. Have you tried replicating the issue
   with WPRocket deactivated?
 * On our end, I have noticed a similar issue happening on our own site: [https://eventkoi.com/calendar-examples/](https://eventkoi.com/calendar-examples/).
   Site visitors occasionally tell us that the calendar isn’t loading. This is the
   error we get on our end: [https://share.cleanshot.com/g3xsf7Cl](https://share.cleanshot.com/g3xsf7Cl)
   Is it similar to what you see?
 * Clearing the cache has worked for us in the short term as we look for a long 
   term fix.
 * I am beginning to suspect the issues are correlated (or even the same issue).
 * Now that I know it’s causing issues for you too, I’ll make it a priority for 
   us to get this solved.
 * If you are able to share any additional information on your end, that would be
   very helpful. We will look into it regardless and fix it as soon as we can.
 * Thank you for flagging this.
    -  This reply was modified 5 months, 3 weeks ago by [Lesley](https://wordpress.org/support/users/lesleysim/).
 *  Thread Starter [mspringer4](https://wordpress.org/support/users/mspringer4/)
 * (@mspringer4)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18752747)
 * I have been unable to recreate the issue with WPRocket deactivated. 
   My errors
   are similar, but not quite the same:`Get index.js?ver=1762543287:42https://sitename.
   local/calendar/events/eventkoi/v1/calendar_events?id=29&display=calendar&initial
   =true&_locale=user 404 (Not Found)andindex.js?ver=1761859018:1 Failed to load
   initial calendar {code: 'invalid_json', message: 'The response is not a valid
   JSON response.'}
 * I am happy to share any additional info to help get this resolved. Is there something
   specific I can track down to aid in this process?
    -  This reply was modified 5 months, 2 weeks ago by [mspringer4](https://wordpress.org/support/users/mspringer4/).
 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [5 months ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18765099)
 * Hi! Sorry for the slow reply.
 * Are you able to use this instaWP site to replicate the issue? I’ve installed 
   WP Rocket and EventKoi Lite in there already.
 *  I’m trying to ensure this is an issue that is isolated to WP Rocket and EventKoi
   Lite.
 * Here’s the link: [https://app.instawp.io/wordpress-auto-login?site=$2y$10$0CJk9ytYjB9JUZm/U9K0aeqN1RIzpHbMHERfsnIkdT/KBffkoprl6](https://app.instawp.io/wordpress-auto-login?site=$2y$10$0CJk9ytYjB9JUZm/U9K0aeqN1RIzpHbMHERfsnIkdT/KBffkoprl6)
 * Thank you!
 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [5 months ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18765878)
 * To follow up on the previous thread…
 * The InstaWP site is a sandboxed site that allows us both to work on the same 
   WordPress install via the magic login link.
 * Please do **not** add any personal, sensitive or confidential information to 
   the site as the WordPress admin is public and anyone is able to access it.
 * I’ll take down the site once we have finished working on it.
 *  Thread Starter [mspringer4](https://wordpress.org/support/users/mspringer4/)
 * (@mspringer4)
 * [5 months ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18766023)
 * It looks like either the 1.1 or 1.2 update has resolved this issue. I am no longer
   getting the error on my site after updating and I am unable to recreate it on
   the instaWP site with v1.2 installed. 
   Thank you for your assistance on this 
   issue!
    -  This reply was modified 5 months ago by [mspringer4](https://wordpress.org/support/users/mspringer4/).
 *  Plugin Contributor [Lesley](https://wordpress.org/support/users/lesleysim/)
 * (@lesleysim)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18770488)
 * I’m really happy to hear that! Thank you!! 🙏

Viewing 9 replies - 1 through 9 (of 9 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwprocket-javascript-deferred-issue%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/eventkoi-lite/assets/icon-256x256.gif?rev=3499485)
 * [Event Koi Lite - Events Calendar, Event Management, RSVP, and Tickets](https://wordpress.org/plugins/eventkoi-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eventkoi-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eventkoi-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/eventkoi-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eventkoi-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eventkoi-lite/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Lesley](https://wordpress.org/support/users/lesleysim/)
 * Last activity: [4 months, 4 weeks ago](https://wordpress.org/support/topic/wprocket-javascript-deferred-issue/#post-18770488)
 * Status: resolved