I want to configure caching on a static website hosted on Azure Websites. My goal is to cache all static website resources: JS, CSS and JPG files but do NOT cache HTML pages. I thought about putting all my cacheable content into assets folder and cache only its contents, but is there are better approaches? Can I somehow use per-extension rules in my web.config file instead?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="~/assets">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
</location>
</configuration>