I want to set up both expires and cachecontrol
and httpExpires
headers in web.config
by following the answer on that question
What's the difference Expires and Cache-control:max-age?
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMaxAge="12:00:00" cacheControlMode="UseMaxAge" />
<clientCache cacheControlCustom="public" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" cacheControlMode="UseExpires" />
</staticContent>
</system.webServer>
But for some reason images became not available when I am doing that.
I've got Failed to load resource: the server responded with a status of 500 (Internal Server Error)
error on each image load (I can see that errors in browser dev tools console
).
I guess I configure it wrong?
It would work if I comment any of clientCache
section by leaving only single one
How to fix that?
UPDATED: Just asked one more related question how to set up both httpexpires and cachecontrol headers web.cofig:
UseExpires
andUseMaxAge
, did you find any solution, or can we use both ? – Knighten