Jump to content
Search Community

Duplicated requests issue

Deadlift79 test
Moderator Tag

Go to solution Solved by Deadlift79,

Recommended Posts

Hi there,

new to GSAP.

 

I've implemented gsap and scrolltrigger in my wordpress enviroment (I use Elementor as page builder).

I've followed your guide:

https://greensock.com/wordpress/

 

All is working fine but yesterday I've notice a major problem that I'm not able to figure out:

Sometimes, if I check the dev console network , I see an enormous amount of requests (you can see in the screen provided) duplicated and related to scrolltrigger.min.js. (If I block it the problem seems gone).

Scrolling the page the amount of requests goes crazy.

The console shows no errors.

 

I've tried serving the .js files selfhosting and through CDN, loading through enqueue or script tag but the behaviour is the same.

 

Any help is appreciated.

 

Thanks!

 

Immagine 2023-01-12 231026.jpg

Link to comment
Share on other sites

Hi @Deadlift79 and welcome to the GreenSock forums!

 

Neither ScrollTrigger, the GSAP Core nor any other GSAP plugin or tool will nor should make any type of request. So the fact that removing ScrollTrigger only tells us that something you're doing in your ScrollTrigger instances or GSAP instances controlled by ScrollTrigger are causing this.

 

Unfortunately without a minimal demo is impossible for us to know exactly what could be the issue. I suggest you to, instead of completely removing GSAP and/or ScrollTrigger, start removing some instances until you find the culprit in order to isolate the origin of all this.

 

Sorry I can't be of more assistance. Let us know if you have more questions.

 

Happy Tweening!

Link to comment
Share on other sites

Hi Rodrigo,

 

thanks for your suggestions.

Would be the live developing website any help?

 

Of course I can replicate my issue in a codepen but I'm pretty sure that won't show any issue.

It is simply that setup for the fake horizontal scroll (with some container animation then added).

 

 

The strange thing is also that now I've tried using GSAP in wordpress with a plugin (motionpage) to avoid any potential error due to my custom code and I'm facing the same problem:

added a simple scrolltrigger and then the related background image sometimes get duplicated 100 times when scrolling in its viewport.

I'll keep investigating, thanks!

 

 

 

Link to comment
Share on other sites

5 hours ago, Deadlift79 said:

Would be the live developing website any help?

Well it's better than nothing but honestly it's super difficult to troubleshoot someone else's live site. Way too many factors involved and we can't tweak things, save it, reload, etc. If I were you, I'd want to isolate things so I'd create another WordPress page (just to test) that only has like one thing on it and apply a ScrollTrigger to it. See if that still has the problem. If so, I'd remove Elementor from the equation and see if it resolves things. Basically start as simple as you can and work your way closer and closer to your "real" page until it breaks. Then you'll know exactly which step broke things. 

 

Like Rodrigo said, GSAP doesn't do any network requests whatsoever. So this isn't being caused by GSAP/ScrollTrigger. 

 

Good luck!

Link to comment
Share on other sites

  • 3 months later...

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...