Speed up your SharePoint site using cache-control

Search

Accessible SharePoint WebSites
Download ARF

Speed up your SharePoint site using cache-control

http://blog.thekid.me.uk

The content on my blog is pretty static, in particular the images do not change that often...if at all. So why does IE need to check to see if an image has changed every time a new page is loaded?

My blog site had slowed down considerably since I added the images for the different flags...all because IE was checking every image to see if it had changed before displaying it.

A quick change to the IIS Application improved the performance of the blog no end. I simply added a cache-control directive to the response headers...

cache-control: max-age=3600, no-check

This increases the max to 1h (3600 seconds) from the 0 that is the default and instructs IE not to bother checking again (no-check). Other values include post-check & pre-check and are shown below...

image

More information abut this directive can be found on the Microsoft website.

You can modify the headers directly from the IIS administration console by selecting the properties of the application and choosing the HTTP Headers tab...

image 

Here you can add your own custom headers...as shown above with the changes I made to my blog IIS site

If your site content is pretty static maybe your visitors could benefit from adding this header, which should improve the user experience and reduce the server load.

Posted by Vincent Rothwell on Tuesday, 17 Jul 2007 16:45  - 31 Comments
Orininally printed from http://thekid.me.uk - Copyright Vincent Rothwell 2007
 

Comments

Sunday, 27 Jul 2008 10:36 by jaap Steinvoorte
Thanks for this article. I read about the caching in SharePoint 2007 and activated it. I implemented the warm-up scripts, and now this neat little tip :-) Thanks again for sharing it.

Sunday, 27 Jul 2008 10:36 by BM
Perfect article..

Sunday, 27 Jul 2008 10:37 by
undeveloped severity Houston!pushbutton home practice theorist unfairness

Sunday, 27 Jul 2008 10:37 by thankful
GREAT .. Thanks a bunch

Sunday, 27 Jul 2008 10:37 by Harold
using the BlobCache which can be configured in the web.config also adds the max-age to the response headers: e.q. <BlobCache location="D:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="1" max-age="3600" enabled="true" />

Sunday, 27 Jul 2008 10:37 by Clint Huffman
After implementing this items in your document library will need to be explicitly refeshed to see the fresh content. I order to not cache document library content after implmenting the cache-control header, then you need to create a custom ISAPI filter to modify the outgoing cache-control header. Also, the BlobCache does not work for SharePoint 2003.

Friday, 15 Aug 2008 07:50 by
intonation varied slavery Anacreon neatness - Tons of interesdting stuff!!!

Saturday, 1 Nov 2008 02:52 by roitrikan
using the BlobCache which can be configured in the web.config also adds the max-age to the response headers: e.q. <BlobCache location="D:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="1" max-age="3600" enabled="true" />

Sunday, 2 Nov 2008 02:22 by Matt Moore
Thanks for the post.

Sunday, 2 Nov 2008 08:48 by Matt Moore
Thanks for the post.

Wednesday, 1 Apr 2009 04:47 by

Thursday, 16 Jul 2009 08:38 by
The problem with IIS caching is that it's a blanket approach - with all pages, images, etc. affected. This means that your authors and editors will be seeing cached pages, which is problematic.

Thursday, 30 Jul 2009 01:02 by Andrew Alt
Very interesting!I�d like to see how far he goes and how well the word will get out.,

Thursday, 30 Jul 2009 01:03 by Scott Foley
Thanks I�ll give that a go!,

Thursday, 30 Jul 2009 01:03 by chrissy bowser
Good Thank you It�s very beautifully,

Thursday, 30 Jul 2009 01:04 by Kurt Krogman
Thanks for your insights � I couldn�t agree more.,

Thursday, 30 Jul 2009 01:04 by FirstNameTest LastNameTest
nice job, very thanks�,

Thursday, 30 Jul 2009 01:04 by christy long
Very interesting!I�d like to see how far he goes and how well the word will get out.,

Thursday, 30 Jul 2009 01:05 by Jessica Jimenez
Very interesting!I�d like to see how far he goes and how well the word will get out.,

Thursday, 30 Jul 2009 01:06 by test2 test2
Hi! The post is really interesting! I�ve read your blog and can say it�s a good job.thanks,

Thursday, 30 Jul 2009 01:06 by Zack Tobias
Great work �. Thanks for your ideas.,

Friday, 31 Jul 2009 01:22 by Darci Stroud
Great work �. Thanks for your ideas.,

Friday, 31 Jul 2009 01:22 by Wendi Brownson
Good Thank you It�s very beautifully,

Friday, 31 Jul 2009 01:23 by Lucy Randall
Oh hell yeah� no graphical smilies around here.,

Friday, 31 Jul 2009 01:23 by james tubbs
nice job, very thanks�,

Friday, 31 Jul 2009 01:24 by Jacqueline England
Good Thank you It�s very beautifully,

Wednesday, 12 Aug 2009 05:08 by
:)

Wednesday, 31 Mar 2010 04:34 by rfarqleet
Great posts, loved reading it, thanks!

Friday, 30 Apr 2010 02:05 by

Friday, 14 May 2010 05:13 by Judas
Very good very good.



Url

Email

Comments