Jump to content
Search Community

multiple image call

reddydheeraj110
Moderator Tag

Recommended Posts

reddydheeraj110
Posted

Image is getting called multiple times in network section of dev tools. when i am using BezierPlugin GSAP 2.1.2 and assigning image as css background 

 

issue.zip

See the Pen MWYWKpG by dheerajreddy8767 (@dheerajreddy8767) on CodePen.

Posted

Hey reddydheeraj110 and welcome to the GreenSock forums,

 

Using your zip file, I had to remove the Enabler.js stuff because it's not allowed. I could not reproduce the behavior that you show. Perhaps it's because of the Enabler.js stuff? If you could please make sure that we can recreate it we'd be happy to help with a solution. 

  • Like 1
reddydheeraj110
Posted
8 minutes ago, ZachSaucier said:

Hey 
Thanks Zach for pointing out CDN newbie mistake?,
I just reattached zip. but issue is still there PFA video

 

reddydheeraj110
Posted

Hey Zach,
we have uploaded this issue "alike file" on the ad server . And Their Ad operations team  also pinpointed same issue with
"badge.png is making about 300 calls when the ad loads (The limit is 100 calls)."


Have tried using above CDN too issue still persist.

I am following below steps to reproduce
1. open http-server at folder.
2. open chrome dev-tools / network section with image tab selected. 
3. uncheck disable cache checkbox
4. refresh 
ta da.....???
 

Posted

I see no issues. What makes you think this is related to gsap?

 

Maybe the problem is your HTML. You have 2 badge ids, both trying to load an image. 

 

<img src="img/badge.png" alt="" id="badge">
    <div id="mainContent">
       
        <div id="badge">
          
        </div>
    </div>

 

  • Like 1
Posted
3 hours ago, ZachSaucier said:

Using your zip file, I had to remove the Enabler.js stuff because it's not allowed.

 

You have to turn your ad blocker off for the ad cdns to work.

  • Like 1
reddydheeraj110
Posted

 

On 11/28/2019 at 10:55 PM, OSUblake said:

I see no issues. What makes you think this is related to gsap?

 

Maybe the problem is your HTML. You have 2 badge ids, both trying to load an image. 

 


<img src="img/badge.png" alt="" id="badge">
    <div id="mainContent">
       
        <div id="badge">
          
        </div>
    </div>

 

Hey ,
Sorry?,
I Was trying to resolve issue by calling png in image tag.
I have removed img tag from the html now
Issue is still persisting when i run locally Not on codePen

Posted

There's not much we can do if we can't reproduce the problem. And again, what makes you think the problem is related to gsap? Remove gsap from the equation, and see if you still have problems.

 

And you should use addEventListener instead of onload.

 

// Problematic
window.onload = function() { 
  init()
};

// Better
window.addEventListener("load", init);

 

And maybe change the name of init to something else, and don't add it to the window.

  • Like 2

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