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?
Figuring this out manually wouldn't too hard in this case.
- Determine the average net speed of your users (you should do this anyway).
- Determine (based on that speed) how long it would take to load a file the size of the large file.
- Determine (based on that speed) how long it would take to load a file the size of the small file.
- Subtract.
So rather than send the JS file straight to the user's browser, you instead send it to another web server, wait for it to "compress" it and then send the results of that compression to the user for you? I can't imagine that saving any time at all, and if the service goes down, your site stops working.
Unless I'm misunderstanding this service you're using, I'd say mod_deflate would be infinitely more useful.
Actually @Azeem.Butt is way wrong, at least partially.
A non-Reducisaurus scenario:
- User A goes to your Website
- User A requests the CSS / JS
- Your host serves the unminified requested CSS / JS
- User B goes to your Website
- User B requests the CSS / JS
- Your host serves the unminified requested CSS / JS
A Reducisaurus scenario:
- User A goes to your Website
- User A requests the CSS / JS from reducisaurus.appspot.com
- reducisaurus.appspot.com requests the CSS / JS from your host
- reducisaurus.appspot.com minifies, caches (
expire_urls
andmax-age
) and serves the CSS / JS - User B goes to your Website
- User B requests the CSS / JS from reducisaurus.appspot.com
- 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