Support » Plugin: LiteSpeed Cache » troubleshooting javascript errors

  • Resolved andrew55


    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:

    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 it’s 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.

    I’m 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 I’d like to figure out how to make this work.

    Thank you for any tips.

    • This topic was modified 7 months, 2 weeks ago by andrew55.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Hai@LiteSpeedāš”


    The js error should have detailed info in dev tool to say the location. If you can’t locate it, please give a screenshot of that error info and a link or report num.

    I can’t see any details which indicate location of file causing issues.

    Here is the link to screenshot of errors:

    Here is the report number: KIHEUKMU

    Here is link to page with issues:

    Thank you for any suggestions.

    Plugin Support stanley@litespeed


    Hi @andrew55, your screenshot page is 404. Also, I’ve 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 I’m missing something, but I’m 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, I’m seeing 2 js errors:

    1. jQuery is not defined
    2. Uncaught TypeError

    Is this what you see?

    Plugin Support stanley@litespeed


    Sorry, it’s 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.

    I’m 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.

    Plugin Support stanley@litespeed


    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘troubleshooting javascript errors’ is closed to new replies.