Jump to content
Search Community

Best way to load plugins

Creativist-Lab test
Moderator Tag

Recommended Posts

Hey guys,

 

I just noticed that when I'm loading GSAP's Core via the CDN that the loading time of my page increases by 24 seconds. So my question is what is the best way to load GSAP and that it doesn't influence performance too much (in my understanding this is by loading via a CDN) so my suspicion is that there is something else going on. Just for info, at the moment I installed GSAP core and ScrollTrigger. Thanks in advance for any help.

This is the url: https://creativist-lab.com

Link to comment
Share on other sites

I don't see that page loading GSAP from a CDN at all. It looks like you've got everything mashed into a single .js file: https://creativist-lab.com/wp-content/litespeed/cssjs/e9570.js?d23a1

 

I can't imagine why it'd take 24 seconds for you (it was less than 1 second for me, but I'm on a relatively fast connection). There are a bunch of CDNs that serve the GSAP files, like https://cdnjs.com/libraries/gsap - perhaps you could remove GSAP from your single file and just load it from the CDNJS site? 

Link to comment
Share on other sites

Hello again, I thought I had everything fixed but turns out something is still not good. Although on the front end everything seems to load normal I get the following results when using Google pagespeeds (see the screenshot) should I just ignore this or is there something I can do. Just a bit of additional info, I turned of all caching plugins and I updated GSAP via CDN to 3.7 but there is still a primary thread blocking going on of almost 22 seconds.

Thanks again.

Loading-GSAP.jpg

Link to comment
Share on other sites

Yeah, I'm not sure what to tell you - that sounds like more of a question for the PageSpeed folks. I can't imagine why it would say that loading the gsap.min.js file was somehow blocking the primary thread for 21 seconds, especially since three.js is 1000% bigger and blocked the primary thread less than 20% of that time. 🤷‍♂️

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...