Cache Optimization for ASP Applications

Optimization is something that every developer wants for his ASP application. User experience can be improved by making your app fast. No one wants to visit a website that takes hours loading just for a single task. That’s why in this article I will show you how to do Cache Optimization for ASP Applications.

Getting Started

The best option to increase the speed of your ASP app is to cache all static resources. Which static resources? Images, Style Sheets and JavaScript files. By doing this, you are telling all web browsers to save (cache) all files that your application needs, so that the web browser doesn’t have to request and download all the static resources every time the users load your ASP application.

This is by far one of the most important things to do when optimizing web applications. You can reduce the load time up to 10 seconds, which not only benefits the users, but also your server, since it saves precious resources that can be used for something else.

How can you optimize your app?

Our previous tutorials demonstrated several ways to do it, and today we are using the “Static Content” element tag that will improve the speed of your site by telling all web browsers to automatically cache all static resources for at least 363 days.

Open the Web.Config File of your application. Locate the “System.webServer” element tag. right below it, add the following code:

  <clientcache cachecontrolmode="UseMaxAge" cachecontrolmaxage="363.00:00:00" />

Save the changes, reload your site and that’s it! Cache Optimization has been applied!

This Concludes Cache Optimization for ASP Applications

Looking for quality Windows Hosting? Look no further than Arvixe Web Hosting!

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , , , , , , , , , , | Posted under ASP .NET 4.0 | RSS 2.0

Author Spotlight

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

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