[WORDPRESS] Is there a way to manually delay external scripts from executing?

Roger Marquez

Elite Member
Joined
Apr 17, 2017
Messages
5,123
Reaction score
7,820
I would like to know if there´s a way to delay the execution of external JavaScripts in WordPress?

I´ve been using Flying Scripts with great success recently for this but for some reason is not working on a client´s site.

I just would like to manually add the code snippet and check if there´s any difference. I am trying to avoid having to use plugins when trying to optimize a site page loading speed.

Thoughts?
 
I would like to know if there´s a way to delay the execution of external JavaScripts in WordPress?
I´ve been using Flying Scripts with great success recently for this but for some reason is not working on a client´s site.
I just would like to manually add the code snippet and check if there´s any difference. I am trying to avoid having to use plugins when trying to optimize a site page loading speed.
Thoughts?

I took a look around and found this, hope it helps. I agree any time that you can avoid
adding a new plugin you should definitely try fixing your problems without them first for
many very good reasons.

Code:
https://kinsta.com/blog/defer-parsing-of-javascript/
 
Yeah, I found plenty of resources about deferring the parsing of scripts but I am interested in delaying them.

Basically what Flying Script (FP) does but do it manually.

What FP does is set a time delay to which it will stop scripts from parsing or until there´s user interaction.
 
Back
Top