# Thursday, 05 February 2009
« Compressing and obfuscating javascript a... | Main | Cool ASP.NET Page Life Cycle diagram »

With all the web 2.0 buzz that started a couple of years ago javascript gets used more and more in modern websites and –applications. Most of the time everyone wants to plug in some cool flashy effect but forgets completely about performance or download size of all that goodness. Also correct placement of certain file types can make your application more performing. I recently found a very interesting article: Best Practices for Speeding Up Your Web Site.

Making css and javascript files external so that they can get cached by the browser is something known to a lot of (web)developers. However placing css as high as possible in the page and the scripts as low as possible is mostly something new. ASP.NET AJAX introduced the scriptmanager control in which one can add scriptreferences. Seen in the light of placing script files at the bottom one can also make benefit of the property LoadScriptsBeforeUI which got introduced with ASP.NET 3.5. It defaults to true, so the scripts will still render at the top. However I suggest that you don’t just switch it to false that lightly but carefully test everything before going to acceptance/production.

Other interesting articles are 10 ASP.NET Performance and Scalability Secrets and 10 Tips for Writing High-Performance Web Applications.

Grz, Kris.