Huangism Posted May 19, 2020 Share Posted May 19, 2020 Hi I recently started using gsap and it looks like the company I work for will use this in our upcoming project. I am currently using a cdn link to 3.2.6, which is a version higher than the link in the getting started page. This has me worried that the version might get updated quite often and the cdn caching might not be as good as it seems unless there is a gsap 3 latest cdn link. I was trying to goggle it but nothing came up. There was a latest jquery.gsap file which was dated back few years ago. So, is there a latest version 3 link? thanks in advance Xin Link to comment Share on other sites More sharing options...
OSUblake Posted May 19, 2020 Share Posted May 19, 2020 4 minutes ago, Huangism said: This has me worried that the version might get updated quite often and the cdn caching might not be as good as it seems unless there is a gsap 3 latest cdn link There's no such thing as "latest" for good reason. That would ruin a lot of sites when there are breaking changes. Just use the most recent version. It's going to be well cached. GSAP doesn't do weekly updates. 1 Link to comment Share on other sites More sharing options...
Huangism Posted May 19, 2020 Author Share Posted May 19, 2020 Are there usually breaking changes within a major version? Link to comment Share on other sites More sharing options...
OSUblake Posted May 19, 2020 Share Posted May 19, 2020 No. Only major versions. like 2.x.x. to 3.x.x. Some cdns do latest, but you are taking a risk. It might be fine for personal stuff, like on codepen. But that's not something I would recommend doing on real public facing sites. You get the latest by excluding a version number. https://www.jsdelivr.com/ https://unpkg.com/ The latest just resolves to an actual version so it's not like the caching is going to better. 3 Link to comment Share on other sites More sharing options...
ZachSaucier Posted May 19, 2020 Share Posted May 19, 2020 18 minutes ago, Huangism said: I am currently using a cdn link to 3.2.6, which is a version higher than the link in the getting started page. Sorry about that. The version number is used in several places across our site and unfortunately they're not all synced. We missed the one on the getting started page when updating apparently. Sorry about that! I've updated it now. 19 minutes ago, Huangism said: This has me worried that the version might get updated quite often and the cdn caching might not be as good as it seems unless there is a gsap 3 latest cdn link. There's no reason to worry. GSAP is still used on over 10,000,000 websites so cacheing can still help you out As Blake said, using latest wouldn't help cacheing anyway. 2 Link to comment Share on other sites More sharing options...
Huangism Posted May 19, 2020 Author Share Posted May 19, 2020 I was under the impression that the latest would grab the latest version file but for the cdn link, it would be one link which does not need to be updated. For example, if 4 million sites is pulling 3.2 by version number, and tomorrow the version goes to 3.21, I update my site to 3.21 then those 4 million sites which has a different version would not help my case in caching. But if they all were pointing to a latest link, then we would all get benefited no matter when the code is updated. This isn't a big deal, I am only asking because I am trying to make a case to use cdn link on my project and I need to convince my supervisor. As far as the version link on get started goes, I wasn't pointing out faults, I was just explaining my scenario but you could use a site wide variable for that number so all you need to do is update it once when a version changes. thanks for replying I believe I have all the info I need Link to comment Share on other sites More sharing options...
OSUblake Posted May 19, 2020 Share Posted May 19, 2020 20 minutes ago, Huangism said: For example, if 4 million sites is pulling 3.2 by version number, and tomorrow the version goes to 3.21, I update my site to 3.21 then those 4 million sites which has a different version would not help my case in caching. Yes, but sites are always updating, so when other sites update to 3.2.1, then it will help. We are talking about millions of requests, so it's not like you're going to be the only site running the latest version. GSAP is the fourth most requested library on cdnjs, with billions of requests every month. 1 Link to comment Share on other sites More sharing options...
Huangism Posted May 19, 2020 Author Share Posted May 19, 2020 Looks like my chances are good then, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now