Jump to content


(JS) Size in KB's don't match?

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




Since the introduction of animation in JS, ad management programs are changing the standard of Flash to JS when it comes to advertisement. But they keep the same restrictions on KB.


When I was given the task to make a banner in JS, Greensock immediately popped up in my head. I've looked at the download page and when customising the library I saw 7 kb when only selecting Tweenlite. As shown here:




But when I look on my mac when inspecting the file:




Am I doing something wrong downloading or am I missing something here? For the banner to be accepted @ the ad networks the JS should be under 10kb.


Hope someone can help me out!


Thank in advance!



Link to comment
Share on other sites

The ~7kb size would be the gzipped size (which is what the CDN provides). gzip is a very common server side tech that is compatible with todays browsers for sending files in a zipped format. If you are unsure about gzip I guess google? - it's probably beyond the scope of this forum. I found this which gives a pretty basic rundown.

But wow, 10kb is pretty restrictive. For an ad that you are using TweenLite for though, you would almost definitely need CSSPlugin as well (can't imagine an ad needing tweens for something other than graphics...) so you might be out of luck anyway.

  • Like 1
Link to comment
Share on other sites

I feel your pain regarding those file-size restrictions. The specs for non-Flash ads are all over the map. 


The good news though is that there is a focused effort in the industry to set some standards. The Interactive Ad Bureau is championing the task of making some sense out of all the confusion out there. 


There is currently an HTML5 Banner Spec Proposal that is open for public comment. I strongly suggest all developers read it and take the opportunity to voice your concerns. Its a fantastic opportunity.


Although I have my own concerns, it is clear that the authors of the document have experience and understand the challenges we face. For instance, they know that 40kb limits aren't going to cut it. I was very thrilled to see they recommend a 75-100kb limit after all files are compressed.

That gives you a decent amount of room to add TweenLite and CSSPlugin and have 80kb or so left for graphics, a light-weight selector engine and your code.



File Size Measurement Definitions for HTML5 Ads
• File size limit of 75-100 KB, measured after compressing the ad (all code and assets) to a .zip file
• The .zip file must include all referenced code such as Javascript libraries
• Once the .zip file is uncompressed, the ad (an .html file) must be viewable without a network 
connection (all code and assets used in the ad is contained in the .zip file)



You can get the spec here: http://www.iab.net/html5

Learn more about how you can participate here: http://www.iab.net/about_the_iab/recent_press_releases/press_release_archive/press_release/pr-050613


I know this does little for your current situation, but there is little anyone can do inside 10kb. The important thing though is that there is progress being made and you have the opportunity to voice your concerns and support to an organization that will ultimately have a lot of say in how things unfold.

  • Like 1
Link to comment
Share on other sites

Thanks for the reply! Good thing to see that they're re-evaluating the issues regarding this and that the public can comment on it. Too bad it hasn't gone overseas yet. Ad Management Company's here in holland are serving html5 banners now, but it's still in kids shoes and bit buggy here and there. Especially full-page overlay ads. They still haven't changed anything on the file sizes etc.


My colleague has written it's own animation already in javascript. Too bad I couldn't use my favorite animation library on this, and make it a nice looking smooth ad on 60 fps. ^_^ Hopefully in the near future...

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.