Yeah I know... But I still like how mootools allows the developer to
download only those portions of the library that they need for the parts
that they are actually using into a tidy little compressed package. :) the
core is under 3k. The core + all elements needed for a javascript accordian
~20k.

It's sort of the same problem... If you are including the entire javascript
library and not just the components of the library that you're actually
using... Fixing that on the front end is one way to reduce your overall page
weight. (which is what it looks like Mike is trying to do)

If I was to try and solve the problem on the other end (after the site was
developed), I would first identify all the javascript objects that were in
use, and where they were being used within the application. No idea on the
best approach for this... Seems like a manual search. Once I had them all
inventoried, I would build a single 'javascript.cfm' file that consists of
conditional logic wrapped around javascript, where the conditions identified
specific javascript functionality given by javascript objects. At the top of
every page, I would put a <cfparam name="jObjects"
default="accordian,XMLHttpRequest,autocomplete"> (where the default values
are the objects that I want included on that page).

After all of this was done, I would include the javascript.cfm like this:

<script type="text/javascript" src="javascript.cfm"></script>

Of course I don't know how well this deals with browser caching issues... 

Jim Rising
Sr. Cold Fusion Developer
ICGLink Inc.
www.icglink.com






-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 11, 2007 11:49 AM
To: CF-Talk
Subject: RE: too many js libraries

He's talking about downloading the code in production to the client
computer. You're talking about a "build" for the developer Jim. 

-----Original Message-----
From: Jim Rising [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 11:06 AM
To: CF-Talk
Subject: RE: too many js libraries

I like mootools' approach... They have a downloader that allows you to
download only what you need:

http://www.mootools.net/download

Jim Rising
Sr. Cold Fusion Developer
ICGLink Inc.
www.icglink.com


-----Original Message-----
From: Michael Traher [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 10:26 AM
To: CF-Talk
Subject: too many js libraries

Hi All, We have developed a large new website and used a number of
javascript libraries along the way for some effects and some ajax stuff.

I have a feeling that we are only using a tiny proportion of these
libraries, but they are being downloaded in full.

My question is how to find out what functions are in use across the entire
code base?

Anyone had to do this kind of optimisation process?

Any tips or tools that might help?

(I am already compressing the files in IIS6)

Cheers

--
Mike T
Blog http://www.socialpoints.com/








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283485
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to