tags:

views:

94

answers:

3

The home page for DotNetNuke 5.2 is around 252.6KB. It uses 15 JavaScripts and 8 CSS files. The number of resources DotNetNuke uses seems excessive to me. I am looking for best practices creating DotNetNuke skins that limit the JavaScript and CSS resources.

+1  A: 

Part of that is just the dynamic nature of DNN - there are some good resources that R2i has published about combining javascript and CSS

One concrete suggestion is to combine all your skin and contianer css in one file and if you have full control of the site to combine the css from the modules you use into that same file.

I know with the addition of the Telerik controls there is some abilities to combine resource files

Another thing that helps is to combine graphics into a single file and use CSS (the sprite technique) to cut down number of files loaded and calls to the sever

codemypantsoff
+2  A: 

You can use the Unload CSS Skin Object to remove links to some of the CSS files loaded by the framework (like Default.css, portal.css & any module-specific CSS files). You can then move all of those styles into the skin (or portal stylesheet, whichever is your preference), so that there's only one stylesheet that gets loaded.

I don't know of any solutions for combining JavaScript resources or reducing the number of scripts that DNN requires.

bdukes
The Unload CSS Skin Object is a great start. I am also documenting the dependencies for the common JavaScript files used by DNN. Then only load them when needed. Seems that some of the JavaScript functionality is primarily used for administration, so I am looking into conditionally loading those scripts. I'll post the dependency list when I am finished.
jacksonakj
A: 

Like it was stated above, it's the nature of the beast. Each module will have at least 1 css file included. You can check out PageBlaster from snapsis.com, I believe it will do what you are looking for.

digmike