News for hackers. Stuff that matters.
Re:How To Minimize Your Javascript and CSS Files for Faster ... by DanielBMarkham on Wednesday November 07, 2007 @03:55PM (#77137)
Yes you read it right. Anything you load into the browser, both in terms of size and additional http requests, is a performance hit.

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.

Re:How To Minimize Your Javascript and CSS Files for Faster ... by pc on Wednesday November 07, 2007 @04:50PM (#77152)
"Every byte that is in your Javascript that has to be downloaded to the client is another millisecond or more of response time."

How many people still use 1KB/s net connections?

Re:How To Minimize Your Javascript and CSS Files for Faster ... by DanielBMarkham on Wednesday November 07, 2007 @04:53PM (#77154)
It was rhetorical. I didn't do the math. So sue me :)
Re:How To Minimize Your Javascript and CSS Files for Faster ... by edw519 on Wednesday November 07, 2007 @04:19PM (#77142)
Smaller variables to have less going down the line? Sounds like striking out the pitcher to me.

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?

Re:How To Minimize Your Javascript and CSS Files for Faster ... by DanielBMarkham on Wednesday November 07, 2007 @04:28PM (#77145)
I don't know what that reference means, but welcome to web app optimization.

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.

Re:How To Minimize Your Javascript and CSS Files for Faster ... by edw519 on Wednesday November 07, 2007 @04:49PM (#77151)
Sorry. In major league baseball, the pitcher is often a terrible hitter, easy to strike out. "Striking out the pitcher" means doing the easy thing that almost anyone can do instead of focusing on the real problem (in the baseball analogy: striking out the good hitters).