Search code examples
javascriptfirefox-addonyslowload-timereducisaurus

Figuring out page size with YSlow / Web Developer extension


I'm trying to figure out how much javascript is being loaded on my website. I'm using Reducisaurus to shrink my js files. The problem is, this is causing both YSlow and the Web Developer extension report the size of my files as ~.04K, which I know can't be right (one of the .js files is jquery, which is 50kb). Is there any way to accurately figure out how much time I've saving by using Reducisaurus?


Solution

  • Actually @Azeem.Butt is way wrong, at least partially.


    A non-Reducisaurus scenario:

    1. User A goes to your Website
    2. User A requests the CSS / JS
    3. Your host serves the unminified requested CSS / JS
    4. User B goes to your Website
    5. User B requests the CSS / JS
    6. Your host serves the unminified requested CSS / JS

    A Reducisaurus scenario:

    1. User A goes to your Website
    2. User A requests the CSS / JS from reducisaurus.appspot.com
    3. reducisaurus.appspot.com requests the CSS / JS from your host
    4. reducisaurus.appspot.com minifies, caches (expire_urls and max-age) and serves the CSS / JS
    5. User B goes to your Website
    6. User B requests the CSS / JS from reducisaurus.appspot.com
    7. reducisaurus.appspot.com serves the cached CSS / JS

    So, by using Reducisaurus you're not only minifying the content, you're also serving only one request per each x seconds, where x it's the number of seconds you've defined for the cache to live (default is 600 seconds = 10 minutes). Also, since it's not your web server that its serving the files it will reduce the workload and theoretically, be even faster. The minification only happens once per TTL.

    There are other things to consider that could make Reducisaurus even more appealing, such as a CDN.

    The thing that worries me about Reducisaurus is it's reliability, since it's free anyone can exploit it and thus render the whole service useless, other than that it's a great idea / service.


    jQuery

    46.401 bytes (45.31 KB):
    http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
    

    jQuery & Google Minification

    24.678 bytes (24.10 KB) - 46.82% smaller:
    http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
    

    jQuery & Reducisaurus Minification

    26.325 bytes (25.71 KB) - 43.20% smaller:
    http://reducisaurus.appspot.com/js?url=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js