-
AuthorPosts
-
September 20, 2016 at 8:06 am #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 ?
September 22, 2016 at 3:07 pm #690287Hey 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,
YigitOctober 2, 2016 at 7:04 pm #694347I 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?
October 2, 2016 at 7:34 pm #694349My 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
October 2, 2016 at 7:40 pm #694350Oh 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?
October 2, 2016 at 7:59 pm #694354Hey!
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,
BasilisOctober 2, 2016 at 8:02 pm #694355good to know, how can this be fixed though ?
October 5, 2016 at 5:09 pm #695631Hi,
I think it would be best to ask this the author/owner of your caching (plugin).
Best regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.