Set the Expires header on static content to increase web site performance

Yahoo and Google recommend setting the Expires header of a web site’s static content (i.e. images) to some distant future date. This makes those components cacheable. It also avoids unnecessary HTTP requests on subsequent page views. If you’re using IIS7, just add the following to your Web.config.

    <clientCache cacheControlMode="UseExpires"  
       httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" />  

Just remember that if you change any of your static content, you’ll have to change the file name.

← newer older →
.Net, Technology, Life, Whatever

Recent Posts

Fixed Focal-Length Eyeglasses, a Programmer's Best Friend
How to Choose the Right VPN Service
Two Handy Command Line Scripts
Tweetz 1.3.2
Tweetz 1.3 Release
Mithril Rising
Tweetz Release 1.2.4 - Screen Off Detection
More... (1085)