Tuesday, October 5, 2010

Sitefinity performance factor - script manager

If you are using sitefinity to build any website then while adding sitefinity inbuilt controls such as menu you will be forced to write Script Manager in the template (master file). If you use script manager anywhere in the website it will load lot of unwanted javascript files along with the target page. It is better we don’t write script manager in any website unless we are building a complex website which needs ajax framework and other javascript libraries. I recommend you manually add menu and menu items in code rather than using sitefinity navigation controls and for ajax calls please use jquery to make server requests. Not having script manager will reduce the amount of javascript resources to a siginificant number.

And on our current project waypoint, we were not using any of the sitefinity inbuilt controls and not ajax framework too. But somehow we were having script manager written in the master file. And due to this it was loading around 350 KB javascript files which were never used by the site. And after I realised, I have removed the script manager tag and noticed a big surprise. The site is perfectly working without any issues and the overall page size was reduced from 500KB to 150KB (Avoiding 350KB for unwanted javascript files).
So I would strongly recommend you to avoid writing Script Manager in your websites and find the alternate solution for that.

kick it on DotNetKicks.com