On Jan 17, 2006, at 1:30 PM, Eugene Lazutkin wrote:
Yehuda Katz wrote:
What would you guys say is the practical maximum size javascript file
you'd want to load with a page?
At this point, I'd like to use:
Mochikit (100k)
Mochikit Scriptaculous Port (50k -- maybe a bit smaller if
compressed)
IE7 (30k)
Is that too much? Won't it cause serious problems for visitors with
dialup?
Then again, doesn't a 100k file cause serious problems for visitors
with dialup?
I understand that the file gets cached after the first use, but even
so, is it acceptable?
I'd love some general feedback.
It is easy --- it was covered in elementary school. You have 180k
=> 1440 kbit. If you assume that your dialup user downloads at
56kbit/s (improbable) you are looking at ~26s pure download time.
Is it too big? It depends on your usability criteria. I say more
than 10 seconds are long enough for casual users. 5 seconds and
less would be optimal. You should either reduce downloadable size,
or rethink who is your target audience.
Now if you can force people to wait (e.g., it is an internal
corporate application, which is to be used in the course of normal
business activities, or your customers have no choice, or you lured
them by some really crafty PR), it should not be a problem. Using
caching techniques will make 2nd and all subsequent accesses
tolerable. You have to worry about the 1st access time.
If you've got a site that has a lot of casual users then you probably
have the time to trim the JS you're using down to the pieces you use
and then pack that. Much easier than starting from scratch and
building up.
-bob