The easiest method to add cache capability to your static webpage


In the C# code behind file write the following inside the Page_Load method

Response.Cache.SetExpires(DateTime.Now.AddYears(1));

In the head section of the page add the following

<meta http-equiv=”expires” content=”mon, 27 sep 2012 14:30:00 GMT”/>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s