开发者

How do you implement far future expires headers in asp.net with IIS 6

We are running a ASP.NET MVC 2.0 web app and it's running on Windows Server 2003 with IIS 6.0. I know that with IIS7+ you can use:

<staticContent>
  <clien开发者_运维技巧tCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365:00:00"/>
</staticContent>

is there a way to get the same functionality with IIS6? We don't have access to the server settings so we cant change it that way either.


If you have access to the webserver, you can do this within IIS manager.

Check out this article on Microsoft Technet for more info:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0fc16fe7-be45-4033-a5aa-d7fda3c993ff.mspx?mfr=true

To set the expiration of Web site content

  1. In IIS Manager, double-click the local computer; right-click the Web Sites folder, an individual Web site folder, a virtual directory, or a file; and then click Properties.

  2. Click the HTTP Headers tab.

  3. Select the Enable content expiration check box.

  4. Click Expire immediately, Expire after, or Expire on, and type the appropriate expiration information in the corresponding boxes.

  5. Click OK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜