Reputation: 23224
I have an Azure site that consists only of static html pages. How can I set the cache-control header in the response?
Upvotes: 1
Views: 3956
Reputation: 20067
You could use the following code to add your custom cache-control header:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear /> <!-- Gets rid of the other unwanted headers -->
<add name="cache-control" value="XXXXX" />
</customHeaders>
<redirectHeaders>
<clear />
</redirectHeaders>
</httpProtocol>
</system.webServer>
</configuration>
For more details, you could refer to this article.
Upvotes: 5