views:

93

answers:

1

I'm combining my javascript into MD5-digest-versioned files. I have a lot of js libraries that don't change very often. Then I have a set of in-house libraries that change somewhat frequently, and another set of application-specific files that changes constantly. I'm wondering if it's worth the effort to combine javascript into three separate files based on change frequency. That way when application code changes, I don't force existing users to download libraries that haven't changed. Does anyone have experience with doing this? One big file is simpler, and perhaps once you've initiated a request and sent half of your javascript you may as well send it all anyway? Do latency concerns dominate over those of bandwidth?

A: 

The answer depends on your clients and more importantly, the latency between your server and the clients.

How much time will it take to request an extra file (assuming pipelining is enabled) versus the bandwidth saved.

If you can atleast make an estimate of the latency between your server and the clients. Than you can make an estimate.

WoLpH