Enabling Cache on Your Windows Hosting Account using clientCache



With our Windows hosting accounts, you can create caching rules to enhance your website's speed by using clientCache in your Web.config file.

Microsoft has instructions on implementing clientCache here, as well as more detailed information about the element here.

Example

Microsoft uses the following example code in a Web.config to enable caching:

<configuration>

   <system.webServer>

      <staticContent>

         <clientCache cacheControlMode="UseExpires"

            httpExpires="Tue, 19 Jan 2028 03:14:07 GMT" />

      </staticContent>

   </system.webServer>

</configuration>



This will cache the content you define as static until Jan. 19, 2028.


  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

URL Rewrite/mod_rewrite for Windows on IIS 7.x 8.x

For customers who are looking for a URL rewrite function (like Apache's mod_rewrite) on our...

Windows IIS Server - Reditect http:// to https://

Using the following code in your web.config file automatically redirects visitors to the HTTPS...

Disabling Browser Cache on Windows Server static files

The following configuration sample adds an HTTP "Cache-Control: no-cache" header to the response,...

Scheduled Tasks (cron job)

Scheduling Tasks (Windows) If you need to run scripts on your hosting account at specific time,...

500 internal server error - How to Get detailed errors

By default, our Windows hosting accounts display a custom/generic error when applications...