mercredi 20 janvier 2016

Http 1.1 Headers configuration in ASP.NET Application

I have small issue here. this is how my web.config looks like:

<add name="Cache-Control" value="no-cache, no-store, must-revalidate, private" />
<add name="Pragma" value="no-cache" />

But when I checked ZAP tool I had something like this:

Cache-Control: no-cache,no-cache, no-store, must-revalidate, private
Pragma: no-cache,no-cache

So the value in pragma is duplicated, also in some responses Cache-Control had "public" at the beginning like:

Cache-Control: public, no-cache, no-cache, no-store, must-revalidate, private

Is there any way to set only headers from my web.config?

Another question is that is there any way to set headers in main response but disable them in when the response is .css and .js file? I want them to be cacheed.




Aucun commentaire:

Enregistrer un commentaire