Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Organizing onload events
- From: moseley at hank.org (Bill Moseley)
- Subject: [Javascript] Organizing onload events
- Date: Sat Sep 23 09:22:17 2006
On Fri, Sep 22, 2006 at 11:04:28PM -0700, Paul Novitski wrote: > The primary trade-off seems to concern cache: if you can tolerate a > long initial load, then the big js file is in cache and won't be > loaded again (until the user clears their cache or explicitly reloads > the browser content). If you break your script down into many > smaller parts and load them as needed, then you distribute the > response time lag more evenly over the experience of browsing the > site. Which way you go on any given project will depend on a dozen > variables, including your expectation of how long (for how many > page-views) an average user is likely to stay and how big "big" is, > even on dial-up. And make sure your web server is returning correct caching control instructions to the browser. mod_expires on Apache. I also compress the large javascript files. Used to be some debate about doing this, but it's probably a win these days. mod_deflate on Apache. -- Bill Moseley moseley@xxxxxxxx
- References:
- [Javascript] Organizing onload events
- From: Triche Osborne
- [Javascript] Organizing onload events
- From: Paul Novitski
- [Javascript] Organizing onload events
- Prev by Date: [Javascript] How to decode obfuscated Javscript
- Next by Date: [Javascript] Share Code with other Web site
- Previous by thread: [Javascript] Organizing onload events
- Next by thread: [Javascript] How to decode obfuscated Javscript
- Index(es):