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
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.
Click the HTTP Headers tab.
Select the Enable content expiration check box.
Click Expire immediately, Expire after, or Expire on, and type the appropriate expiration information in the corresponding boxes.
Click OK.
精彩评论