views:

373

answers:

4

I am working on a asp.net website. There are a lot of javascript plug-ins that site uses including the bookmark button(addthis), Google adsense, Admanager tags, Social Bookmarking buttons and so on.

The page loads slow and even though I have been using tools like FireBug, I haven't been able to make out why does my page load so slow.

Is there a way to find out which javascript is causing the page to load slow? Or find out the culprit and take it out?

Please be kind to me as I am just getting started with this stuff.

+7  A: 

Using the Net tab of Firebug should show you which requests are taking the longest to load. See this page for a more detailed guide to using this information.

You could also use the YSlow addon for Firebug to identify other ways you could improve the loading time of your page.

Sam Wessel
Thanks Sam YSlow looks very useful..Net tab is also very good!
Musa
Is there any standard that a javascript should take 'x' seconds to load..or is YSlow's recommendation enough?
Musa
Musa, I'm not aware of any standard in place, but YSlow's grades have always been a useful benchmark for me. Be aware that they are quite strict though - often C or above is a good mark.
Sam Wessel
A: 

Use YSLow , it will help you to trace the problem.

Pere Villega
+1  A: 

Have you tried removing scripts and complexity from your web page (one by one), sooner or later you will hit the one script that takes long time to load. If there is any.

If your web page gets consistently faster as you remove scripts and items, then that is the truth and you should look at optimizing those scripts.

Makach
especially consider viewstate and session
annakata
aye, it's a famous programming technique: divide and conquer :)
Makach
+1  A: 

If you are experiencing this problem when running your website in FireFox locally (localhost), it may be caused by the infamous ipv6 problem in firefox.

This can be fixed by entering about:config in the FireFox address bar, type in ipv6, and you'll see a setting network.dns.disableIPv6. Set this to true, and your pages will load a lot faster.

Philippe Leybaert
The difference after changing that setting was HUGE! Thanks for the great info
Rob