configuring IIS to cache based on content-type?
<p>We had a weird issue on our site last week that seemed to be a caching issue. A version of our page was cached with <code>Content-Type: text/vnd.wap.wml; charset=utf-8</code> set in the header.</p>

<p>After some research, I found out that asp .net uses .browser files in the <code>%SystemRoot%\Microsoft.NET\Framework\versionNumber\CONFIG\Browsers</code> path to determine preferred mime types for certain user agents. based on the content-type above, it looks like a Nokia phone was the first application to hit our page after a cache clear based on the content-type above, and asp stored a cached version of the page with that content-type rather than <code>text/html</code>. the problem with that content-type is that browsers do not recognize it, and will just display the page as plain text.</p>

<p>I could verify that the above scenario was the cause. I took one of our servers out of our pool, recycled the app pools for the site and reset iis, then hit the page with fiddler and passed the follow headers as a GET to our homepage.</p>

<pre><code>Accept: text/html
User-Agent: NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1
</code></pre>

<p>this returned the following content-type in the response as expected:</p>

<pre><code>Content-Type: text/vnd.wap.wml; charset=utf-8
</code></pre>

<p>Now to fix this going forward, it would make sense for asp to cache various flavors of the page based on the content-type it will be serving, right? is there a way to configure asp to do this, or is there a better way to handle this scenario?</p>
