• Resolved washingtonsblog

    (@washingtonsblog)


    Hi,

    Google Speed Test says I’ve got render-blocking javascript, namely jquery, in the above-the-fold CSS.

    When I try to defer and/or load javascript asynchonysly, it breaks the javascript functions on my site. Specifically, my responsive menu for mobile devices doesn’t work.

    How can I stop render-blocking jquery, without breaking functionality?

    Should I use the “ready” parameter for jquery?

    My site is WashingtonsBlog.com, and I use Twenty Ten

    Thanks in advance for any help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    To be honest, don’t do that, at all. WordPress needs jQuery, as do some plugins, and probably your theme too.

    You don’t *have* to do everything that Google’s speed test recommends. Remember, you can also lose weight by cutting off both of your arms, but that’s not exactly beneficial overall. ??

    Before going any further take a look at a few speed tests that also have good standing in the community, like https://www.webpagetest.org/ and https://gtmetrix.com/

    Both offer some great data and suggestions, but before acting on all of their suggestions, compare your site’s speed to what you’d consider your largest “competitors” to be. While it may be tempting to get your load time under 2 seconds, for example, you might find that the load times for your “competitors” are around 7 seconds.

    With that said, your site currently isn’t loading at all, the server itself isn’t even responding, so you’ll need to get that fixed with your hosting provider first.

    Thread Starter washingtonsblog

    (@washingtonsblog)

    James,

    Thanks. I guess I’ll leave as is for now.

    Moderator James Huff

    (@macmanx)

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deferring jquery Breaks Website’ is closed to new replies.