Cache-Control Header & Browser Caching IIS7

前端 未结 2 359
夕颜
夕颜 2021-02-04 20:21

I am using Google Page Speed on my website in IIS7 and I was wondering how to set

Leverage browser caching - The following resources are missing a

2条回答
  •  鱼传尺愫
    2021-02-04 20:34

    I imagine you already figured this out, but read up on setting content expiration in IIS here.

    Note that this only applies to static content served by IIS. If you are looking to set caching headers for dynamic content (ASPX, PHP, ISAPI, whatever), you need to generate your own Expires and Cache-Control headers in your application. IIS will (quite correctly) not attempt to apply cache-control headers to dynamic pages that may include Set-Cookie headers or private data. ASP and ASP.net automatically set "Cache-Control: private" by default for all pages, but you can override that behavior on a per-response basis.

提交回复
热议问题