Jump to content


general question about linking to the "latest" version of TweenMax

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

So I was just updating my HTML template today, and reading a lot about how it's a bad idea to link to the "latest" version of JQuery (which is no longer updated for exactly that reason).


Would the same concerns not also affect Greensock?


Yet here (http://www.greensock.com/get-started-js/) in your documentation you have:

<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>


I read the boilerplate about how you are very cautious making changes and ensuring backward compatibility, but had to ask.  Also, are there not concerns about previous versions being cached?  (I don't know much about cache settings; is that something that's configured on your CDN server?)


Just looking for assurances that it's okay to put the above line of code in my template and leave it there without thinking about it. :)


Thanks, eh.

Link to comment
Share on other sites

Good question,


First we always link to latest in our demos and code used in articles because we want those resources to always be up to date. If we hardcoded version numbers into those resources it would be a nightmare to update them every time we pushed a new release.


Also when people use those resources and samples they can be assured they always have the freshest version.


Furthermore it makes it easier for us to test new versions using our existing demos.


However, I would recommend that you use a version number in your production environment to be totally safe. Once our versions are in the CDN they NEVER change. You can be absolutely sure that things will work 10 years from now using 1.13.1 the same they do today. If you are linking to "latest" there is always some amount of risk. 

  • Like 4
Link to comment
Share on other sites

Hello jasper, and Welcome to the GreenSock Forum.


The Mighty Carl beat me to it again. But to add to Carl's great advice... :)


In my personal experience i like to use specific versions of any JS library so I know if the latest JS file changes or gets updated up a version doesn't have deprecated methods and properties.


This way you can control when there is a new update, to make changes accordingly so your website or web page doesn't break without you knowing.



Link to comment
Share on other sites



As far as I know there are no problems with linking the latest version. For the reasons you mention about jQuery I never do that once the site is deployed in the server, just a best practice stuff.


GSAP does still support methods that are deprecated, insert(), insertMultiple(), for example, so there's backwards compatibility if you're using those methods. Sure for samples and development versions of your sites/apps there's no issue, 


But just like with any other framework is the user responsibility to keep up with the versions . For example since the release of version 1.12.1, with all the performance enhancement I've been reviewing some stuff I made in the pass in order to see if there's an improvement in certain scenarios and suggested the update to that version.

Link to comment
Share on other sites

Oh well... everything they said already  8-)

  • Like 2
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.