Jump to content


CDN Paths / Latest or actual version / Banner

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts



i am doing tons of online advertising banner stuff. Sometimes I have to use local JS GSAP libraries, but often i can use the CDN path to Tweenlite etc. to save file size when delivering to the advertiser.


There are two methods - to link to the latest GSAP eg


or link to the version # of GSAP when coding the banner
What is more save to ensure the banners will work, when they show up later "live" at the browsers.
Today i had some trouble when using the CDN Links with version # and got a error in Google Chrome's Browser ERR_SPDY_PROTOCOL_ERROR where the JS scripts did not load at all - so did not the banners!
This should never happen when the work is "live"...



Link to comment
Share on other sites

I'm not familiar with that error, other than what the internet says:




but you aren't just changing the from /latest to /1.18.0  your first set uses http and the second set uses https. 

Try using a relative protocol url  (not http or https) and see if that changes anything.




Also, never link to /latest when you push something live. Always use the version number. Although we do our best to avoid it there is always the remote possibility that we release an update that has some change or bug that may cause your banner to work differently. If you test with 1.18.0 and go live with 1.18.0 you absolutely eliminate that risk for eternity.

  • Like 1
Link to comment
Share on other sites

Thank you Carl,


i didn't notice the https !!! - i just did copy paste from the "http://" ;-)


Is the relative URL "//" save? I did not ever tried this... But it could save me some work, because some banners also do have to work in https environments.


So - i will never link to /latest - good advice.

  • Like 1
Link to comment
Share on other sites

You will run into problems if you run your banner on a secure domain (https) but try to load something from http. 

Loading a resource from https location should not cause you problems even if the banner is on http.

You will note that Google provides https links for all of its hosted libraries: https://developers.google.com/speed/libraries/#web-font-loader


Again, I can't say with confidence that https caused that error, I was recommending the // approach as a test.

Everything I've read leads me to believe that using https is the safest.

Link to comment
Share on other sites

the // approach only seems to work when it is on a server. When testing local it seems not to work.


I got an answer from an AdManagement (flashtalking), that cloudflare is not accepted of them because they use cookies - also Amazon, Yahoo, Google seems not to trust cloudflare. But they also recommend to use always "https://"



Just another question -


i often had - in flash AS 3.0 - to "tint" objects like text, to change the colors fast, not needing to replace the graphic themselves.

Which feature do i use when i want to tint SVGs, because i almost use SVG for text.


Is it the ColorProbs Plugin or do i need to use TweenMax, what i want to avoid because of the filesize.

Link to comment
Share on other sites

For the record, Flashtalking has their own CDN that hosts TweenMax. They've been great to work with and are very GSAP-friendly. You can ask them where you should point to for their TweenMax URL. 


Happy tweening!

Link to comment
Share on other sites

To add to these fine gentleman's great advice!


Here is an example that uses the GSAP AttrPlugin to Tint SVG child elements using SVG Filter Tint: Hue-Rotate


See the Pen MwPzox by jonathan (@jonathan) on CodePen


But the new HSL feature in GSAP 1.18.0 should be the best route as Carl advised making it the peanut butter and jelly!






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.