In IIS 7.5, you can add static HTTP Response headers, but I want to add an \"Expires\" header that always specifies a date that is 7 days in the future.
I\'m running
You can only add dynamic expires header using program code.
Source: The Microsoft IIS Site
You should use Cache-Control max-age instead, like suggested in the other answer.
This is a standard feature of IIS. The HTTP Response Headers module allows you to set this common header. This results in the following web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
You should do this only in the directories where you want this header to be send. Typically only directories with static content.