Any reason not to add “Cache-Control: no-transform” header to every page?

后端 未结 2 488
日久生厌
日久生厌 2021-02-04 05:57

We have recently fixed a nagging error on our website similar to the one described in How to stop javascript injection from vodafone proxy? - basically, the Vodafone mobile netw

2条回答
  •  甜味超标
    2021-02-04 06:17

    The reasons not to add this header is speed performance and data transfer.

    Some proxy / CDN services encode the media, so if your client is behind proxy or are you using a CDN service, the client may get higher speed and spend littler data transfer. This header actually orders proxy / CDN - not to encode the media , and leave the data as is.

    So, if you don't care about this, or your app not use many files like images or music, or you don't want any encoding on your traffic, there is no reason not to do this (and the opposite, recommended to).

    See the RFC here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5

提交回复
热议问题