Basic Knowledge Base to Render Custom SharePoint Page Faster

Performance is always a point of concern for any site from a normal site to an enterprise wide SharePoint application. From a farm administrative point of view, we take many actions to improve performance of a site. Implementing object cache, blob cache, IIS compression are a few examples. But it is not always that farm administrators can do to improve the performance. Much of it also depends on the site administrators and contributors on how they upload content and how the site is desinged.

Here I will talk about a few things that a site admins and content authors might keep in mind while wokring on a site. These are pretty small things that often go unnoticed but if implemented can significantly reduce page load times.

Put stylesheet at the top of the master page (if using SharePoint designer)
Moving stylesheet to the document HEAD makes a page load faster. The problem with putting stylesheets near the bottom is that it prohibits progressive rendering in browsers including IE. The browsers block rendering to avoid having to redraw elements of the page if their styles change. The user is stuck viewing a blank white page.

Put scripts at the Bottom
Scripts block parallel downloads. So always try to place your scripts at the bottom of the page. The browser waits until the script is loaded before rendering the rest of the page.

If this post helped you, please visit the sponsors from to check the latest offerings   

Optimize CSS
Cascading Style Sheets(CSS) make websites much more structured because they allow the browsers to cache style-related information from the .css file directly, eliminating the need to read that information every time a single page is loaded. Even if Style Sheets are naturally more efficient than HTML tables you can still optimize the CSS code to make your website cleaner and faster. Remove whitespaces as and when possible. Avoid repetition of the code wherever possible to make your style-sheets lighter, Use Shorthand Properties, Take Advantage of Your Inheritance, Use Grouping, Cut the Comments, Apply Styles Wisely.

Image formats
There are various image formats availale and they should be chosen effectively. Try using png whereever possible (this was made to replace gif and has small size). GIF is the most favorable format used in the internet for its small size. Use gif for logos, button etc. JPEG should usually be avoided but if you need to use jpeg, try compressing the image with a 50% compression rate for optimal results.

Use heights and widths for images
If the browser does not see the heigh and width tags, it will figure out the image size after downloading it and then load the rest of the page. When these tags are included, the browser will know the size beforehand, and will hold a place for the image and loads the rest of the content. Apart from the improvement on the load time, users can start reading the content of the page even while the images are not fully downloaded.

Avoid Empty image src
Image with empty string src atribute occurs more work for the server. It makes another request to the server and cripples the server by sending a large amount of unexpected traffic and wasts server computing cycles generating a page that will never be viewed.

Use Picture Library Thumbnails
Instead of using the main picture, you can use the thumbnail provided by the SharePoint image library. You can right click on the thumbnail of the image in the library and select Properties. From the properties window, copy the url of the image. This is a very lightweight version of the original image and will make a significant decrease in the page load time if you are having a lot of images on the page.

If this post helped you, please visit the sponsors from to check the latest offerings   

Utilitze caching effectively
SharePoint has a number of caching mechanisms.

Caching for webparts
Caching can be controlled on individual web parts (RSS feeds, Dataform web parts). These web parts should always be cached so that the queries do not run every time a page is visited. The timeouts for these caching should be for atleast 10 minutes (600 seconds). You might consider increase it to a higher value depending on the data that is being displayed.

Output cache
Site admins should also consider output cache and enable it in the site collection. Also consider selecting caching profiles for anonymous and authenticated users.

Object cache
Microsoft suggests not to have more than two content query web parts on a page. Make sure you set the “Use the cached result of a cross list query for this many seconds” value to atleast 10 mins.

Analyze requirement before turning on Auditing
Auditing is really helpful at times but it is recommended not to use auditing excessively (unelss you have a valid busiess requirement). Auditing consumes more server resources (both web and database) depending on how and what options has been enabled.

No closed web parts on page
You should always delete web parts (and not close them) if you dont need it on a page. A closed web part, even if is not visible, gets processed by the system everytime a page is displayed. A web part can be kept as Closed only when you think that you may need it back in the future. So next time, dont click on the X button on the web part but go to the web part menu and click Delete.

If you have closed web parts on a page and now want to delete them, you can go to the Web Part Maintenance Page (append &Contents=1) and delete all the closed web parts from there.

Poor performing web parts (this will be a separate post by itself)

Content query web parts
For performance reasons, it is recommended not to have more than 2 CQWP per page. If possible, try to point these queries directly to lists and document libraries rather than searching for a particular list types or content types.

Another performance improvement would be to ensure any field sorted on be indexed with MOSS.

If a list has 20 columns and only two of them are being used by your CQWP, utilize the “ViewFieldsOverride” property to eliminate columns returning with the query. Instructions on customizing the content query web part can be found here: Details for the ViewFieldsOverride Property can be found here:

One thought on “Basic Knowledge Base to Render Custom SharePoint Page Faster

  1. Andreas - SharePoint Tutorial

    Your right performance has to be respected by authors or owners of a site.

    Developers can help here too since they can prevent the loading of JavaScript e.g. if you are in an anonymous scenario where you don’t need the SharePoint 2010 out-of-the-box JavaScript files. A developer can also combine multiple CSS files into one…

    As you said performance is gained by different people.


Leave a Reply

Your email address will not be published. Required fields are marked *