[Resolved] Defer parsing of JavaScript

Home Forums Support Defer parsing of JavaScript

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1055100
    imke

    Hello team,
    I’ve a problem with loading my website: on GTmatrix it shows “Defer parsing of JavaScript – Grade F(12), which is very bad.
    Already tried “Asynch Javasprict” – no change. Tried to add a script to functions.php in the theme – no change.
    I took the plugin “Autoptimize”, which made no difference to JS, just for css a little.
    What can I do?

    I’d also like to know how to optimize the order of styles and scripts, which is recommended.

    Thanks for help,
    Imke 🙂

    #1055384
    David
    Staff
    Customer Support

    Hi there,

    3 of the 5 offending script files are related to youtube, which are embedded as iFrames which is where the script is being requested from. So none of the methods you tried will apply to them – they only work with requests being made by the page itself.

    If its really important to defer them then google: Defer Parsing of JavaScript With YouTube Videos – there are quite a few articles on how to do.

    Or there is this how to by one of our Site designers:

    https://elementortemplatepack.com/generatepress-elementor-embed-lightweight-youtube-videos-faster-page-speed/

    Hope that is of help.

    As a note when i checked your site on GTMetrix the biggest offender was the 1.2 seconds waiting time for your server to respond. May want to ask your host about that.

    #1055669
    imke

    Hi David, thanks a lot! That assures me a bit more 😉
    BUT – https://elementortemplatepack.com/generatepress-elementor-embed-lightweight-youtube-videos-faster-page-speed/ – doesn’t work: Script shows up on page and it is not responsive 🙁 I guess, it doesn’t fit with the Elementor plugin, even though it says so.
    WP YouTube Lite Plugin doesn’t work either. I guess, it is also a conflict with the Elementor Plugin.

    #1055790
    David
    Staff
    Customer Support

    Unfortunately Elementor does introduce a few more layers that could be a conflict.
    Maybe have a chat with their support to see if they have a workaround.

    #1055791
    David
    Staff
    Customer Support

    Unfortunately Elementor does introduce a few more layers that could be a conflict.
    Maybe have a chat with their support to see if they have a workaround.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.