Wordpress LScache Plugin: troubleshooting javascript errors
Last Updated on: Wed, 15 Apr 2026 00:00:02 I am trying to get suggestions for how to better troubleshoot javascript errors. On our site, when we us js combine in LiteSpeed settings, we get a javascript error (jQuery is not defined). I found this guide which is helpful: https://blog.litespeedtech.com/2018/01/31/troubleshooting-lscache-optimization/ But when I use LiteSpeed debug mode and use inspect in chrome, I see 50 js files in our site. To go through each file to test if its the culprit is a huge tasks. To compound the issue, as plugins are regularly updated, the plugins often have code changes which create new js errors. So this creates an ongoing issue of identifying js errors. Im not complaining ? just trying to figure out if there is more efficient way to identify what js files are causing issues so I can exclude them when needed. Combining js is important to us (noticeable changes in page speed), so Id like to figure out how to make this work. Thank you for any tips. This topic was modified 3 years, 7 months ago by andrew55. The js error should have detailed info in dev tool to say the location. If you cant locate it, please give a screenshot of that error info and a link or report num. I cant see any details which indicate location of file causing issues. Here is the link to screenshot of errors: https://www.lifeleap.org/jserror.JPG Here is the report number: KIHEUKMU Here is link to page with issues: https://www.lifeleap.org Thank you for any suggestions. Hi @andrew55, your screenshot page is 404. Also, Ive checked your page, most of the JS error is due to resources not found: Failed to load resource: the server responded with a status of 404 () Could you try to fix those errors first? Maybe Im missing something, but Im not seeing anything relating to a 404. The screenshot pulls up fine for me (when I click the link in this post). In the console, Im seeing 2 js errors: 1. jQuery is not defined 2. Uncaught TypeError Is this what you see? Sorry, its my mistake on the server connection. We find that your jQuery is load after minified js, please try to remove js/jquery/jquery.js on JS Excludes as you already turned on Exclude JQuery. Thank you. Your suggestion fixed the js error. Im still clueless how you determined this by looking at the js errors in the console. Being about to correct these issues is what I originally created this topic for. Please let me know if you have any suggestions or tutorials so I can learn how to accomplish this myself in the future. jQuery is not defined is a js common issue that you put the jQuery after other js scripts which need jQuery function. Normally, we will exclude all jquery from JS combine and put it after combined JS automatically. But if you put jquery on JS Excludes, the function will override the JS Excludes function and put the script before combined js which caused the error. Thank you for the clarification.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference