How To Minimize Your Javascript and CSS Files for Faster Page Loads
maxkiesler.com
maxkiesler.com
Also, I understand the need for obfuscation, but to improve page load speed? How?
Obfuscation helps improve performance speed by making the variables as small as possible while avoiding name collisions. In practice this probably means a file full of one-letter variables, instead of things like elemResult
Every byte that is in your Javascript that has to be downloaded to the client is another millisecond or more of response time. This is the reason why I wouldn't use huge honking JS libraries unless I was really sure I needed them (call me old-fashioned). Interestingly enough, looks like there is a case to be made for package libraries, where you download one file and it explodes into both the CSS and JS part of your app. Makes sense to me, although I've never tried it.
One of my constant struggles has been where to build HTML that has to be built on the fly, server or client? On the server, lots more bytes to ship down the line but less javascript to run once it gets there. On the client, 10% as much data to send, but then lots of javascript to run to assemble the HTML. Anyone else ever struggle with this problem?
There are a couple of apps that can convert any HTML into their dynamic counterparts. You can also do some XML/XSLT/XHTML stuff, or you can load and pre-cache in the background, which might be your best bet. Depends on your architecture and what you are trying to accomplish. I've used all of the above. I'm sure there are lots more options.
How many people still use 1KB/s net connections?
http://journal.dedasys.com/articles/2007/11/07/yui-compresso...