Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
reddydheeraj110

multiple image call

Recommended Posts

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
Link to post
Share on other sites

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

Link to post
Share on other sites

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
Link to post
Share on other sites
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
Link to post
Share on other sites

 

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

Link to post
Share on other sites

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
Link to post
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.

×