Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #688997

    I found this great article on defering JS https://varvy.com/pagespeed/render-blocking.html

    Using this site ive identified the js i can defer https://developers.google.com/speed/pagespeed/insights/

    The article i linked first above says:
    This code should be placed in your HTML just before the </body> tag (near the bottom of your HTML file). I highlighted the name of the external JS file.

    Where is that HTML located on my ftp ?

    #690287

    Hey kilimats,

    Please add following code to Functions.php file in Appearance > Editor

    function avia_custom_code(){
    ?>
    // Your code goes here
    <?php
    }
    add_action('wp_footer', 'avia_custom_code');

    Best regards,
    Yigit

    #694347

    I gave you the wrong link, here it is https://varvy.com/pagespeed/defer-loading-javascript.html

    I need to add the code in the HTML file just before the </body> tag. where do i find that file?

    The code you provided only push the JS to the footer location right? i need to relocate them in a different file to truly defer it. Or do you suggest against it?

    #694349

    My goal is to fix this error on our site as pictured in private below

    I found this suggestion too but didnt help https://kriesi.at/support/topic/enfold-theme-implement-deferred-parsing-of-javascript/#post-690356

    #694350

    Oh nevermind, i refreshed the cache and the error is gone now using the code above in my child function.php file, one issue remains, the full screen text animation on the homepage that says TRADING AUTOMATION PERFECTED shows without animation first, then reset and display the animation, how can i tell it to not defer that animation?

    #694354

    Hey!

    That issue is because of the scripts position… The element loads before the CSS / JS loads ( or the minifation ).
    That does happen with some elements, when they get under cache.

    Let us know if we can help further

    Regards,
    Basilis

    #694355

    good to know, how can this be fixed though ?

    #695631

    Hi,

    I think it would be best to ask this the author/owner of your caching (plugin).

    Best regards,
    Andy

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