Question : Optimize Javascript and CSS

I have a customized SharePoint site (MOSS 2007) and I am dealing with performance issues with our site. I have noticed from the fiddler logs that each page request loads 10-15 javascript/jQuery files which includes SharePoint out of the box scripts and custom scripts, which results poor page load times. Though we have caching turned on, it is still very slow. I would like to find a way to minimize the number of files loaded per request.

My questions,
1. what's the best way to handle many javascript files on a web page without breaking their functionality?
2. How can I combine (package) them together so that 1-2 files gets loaded per request?
3. Are there any other options to deal with javascript files which can reduce the page load time?

I found this tool called "juicer" (http://cjohansen.no/en/javascript/juicer_a_css_and_javascript_packaging_tool), has anyone used it??
Are there any tools/solutions available out there? I really appreciate any suggestions.

Answer : Optimize Javascript and CSS

Hi there! I recommend you using YSlow, which is a firefox extension that has many useful tools. With this tool, you can check why your site is taking so long to load and then you will know how to proceed.

It also has a javascript compressor that works like a charm, cuz it runs over you site and retrieve and compress the code in the same order your site is using it, so, your code wont break.

There's also a js beautifier, css compressor and many other cool features included in this beauty =)

Jerry
Random Solutions  
 
programming4us programming4us