Configuring ETags with Http module in asp.net

懵懂的女人 提交于 2019-12-01 20:34:01
Aristos

First you can remove the server tags in your server ! and not let him place it again and again and you then remove it.

You can do that even on your web.config using the customHeaders:

<httpProtocol>
    <customHeaders>
        <remove name="X-Powered-By" />
        <remove name="X-UA-Compatible" />
        <remove name="ETag" />
    </customHeaders>
</httpProtocol>        

The ETag or entity tag is way to flag a page and then see on your code if the page have been change and need to be update. If you see the ETag then some part of your code is added for this check and I think that you must left it as it is because you break this logic of the program.

If this ETag is places by server to flag images or similar items, you can avoid most of this tag by adding the static content be live more, and this is also can be done on iis, or on web.config as.

<staticContent>
    <clientCache cacheControlMaxAge ="8.00:00:00" cacheControlMode="UseMaxAge" />
</staticContent>

So I think that the module that you made is not necessary for this thinks.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!