Cache aspx page returning an asset on client?
How do you cache an aspx page call on the client?
The aspx page returns an asset and looks like this:
http://srv-edu-build/edumatic3/dev/RetrieveBlob.aspx?assetId=31809&assetFileId=9823
We have tried with Output Cache, with caching in the code behind, but the only result we get is server side caching (by IIS7).
In the header of 开发者_C百科the response cache-control is set to public and expiration time is set (to 14800 as set in output cache profile).
I think I've found why this happens it's a bug in IE.
IE can't cache if the Vary:*
HTTP response header is used, but IIS returns it by default because it's in the HTTP 1.1 spec.
Try adding the following to your web.config:
<system.web>
<caching>
<outputCache omitVaryStar="true" />
</caching>
</system.web>
精彩评论