Jump to content
GreenSock

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

File size

Recommended Posts

I work in an environment where a lot of animation is required but a tight file size limit is enforced. I've been using Tweenlite for a couple years and i love it, i just wish that it wasn't 50k by the time you include Tweenlite and the CSS plugin. Does anyone have any suggestions for a lighter weight version of Tweenlite?

 

Also, on the downloads page if you go to customize and you start picking which parts of the GSAP you want, Tweenlite says its only 7Kb and the CSS plugin only 12Kb, but when i download them they are 24k and 31k respectively. Are those lower file sizes incorrect or gzipped or what?

 

Anyway suggestions would be appreciated.

Link to post
Share on other sites

Hi Mike and welcome to the Greensock forums.

 

TweenLite and the CSSPlugin are just 21kb compressed and GZIP, you can check the tutorial suggested in this reply by Jamie to see how to use it in your server:

 

http://forums.greensock.com/topic/7781-js-size-in-kbs-dont-match/?view=findpost&p=29639

 

As you can see in this the GZIP file size is the top one, that's the amount of data transferred, and the bottom size is the uncompressed size. Once the download has completed the browser takes the file and extract it, reaching 31 and 24 kb respectively:

ovq4.png

 

Also as you can see in this post, this discussion has been brought up before, but as Jack has stated the challenge remains: what comes off?

 

http://forums.greensock.com/topic/6065-tween-nano/

 

Also is a good practice to use the CDNJS links in order to access the GZIP files and reduce file size:

 

http://cdnjs.com/libraries/gsap

 

Rodrigo.

  • Like 4
Link to post
Share on other sites

Yep i second Rodgrigo's great advice!  .. GZIP is the way to go, if it is available on your server, and using a CDN for faster cached delivery. ;)

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

×