• Google page speed showed I have a 23 java blocking scripts resources. This website told me I need to copy and paste this code into my website’s HTML.

    https://varvy.com/pagespeed/defer-loading-javascript.html

    This is the code it told me to use.

    <script type=”text/javascript”>
    function downloadJSAtOnload() {
    var element = document.createElement(“script”);
    element.src = “defer.js”;
    document.body.appendChild(element);
    }
    if (window.addEventListener)
    window.addEventListener(“load”, downloadJSAtOnload, false);
    else if (window.attachEvent)
    window.attachEvent(“onload”, downloadJSAtOnload);
    else window.onload = downloadJSAtOnload;
    </script>

    My question is how do I need upload this to my HTML so my website can be up and running again fast? I’m newish to web development so please bare with me on this..

Viewing 1 replies (of 1 total)
  • Thread Starter evanp127

    (@evanp127)

    My WP made me erase WP Cache, so that didn’t work. I tried using Async JS and CSS plugin and that didn’t work either. Any help would be greatly appreciated it!

Viewing 1 replies (of 1 total)
  • The topic ‘how to render blocking javascripts?’ is closed to new replies.