开发者

IIS 6.0 not sending Expired header though I have turned it on

开发者 https://www.devze.com 2022-12-18 08:27 出处:网络
My website is hosted on Windows server 2003, IIS 6.0. The website i开发者_JAVA百科s developed on ASP.net, with Microsoft Framework 3.5

My website is hosted on Windows server 2003, IIS 6.0. The website i开发者_JAVA百科s developed on ASP.net, with Microsoft Framework 3.5

I have set the content expiry to 12 hours for the complete site using the following settings :

IIS Manager->Site->Properties->HTTP Headers->Enable Content Expiration->Expire After->12 Hours(s)

The Problem is that when i load the site, Expiry header is not being sent with the site. can any one please help me with this.


IIS 6 will only add this header to static content, e.g. anything not mapped to the asp.net handler (css, js, images, etc). Are you not seeing the header at all, or just not seeing it on your asp.net dynamic content/pages?


When using "Expire After" option in IIS 6.0; IIS 6.0 doesn't send the "Expires" header, it instead sends the "Cache-Control" header to mark cache duration of static content on the client side.

If content should expire after 12 hours(12 hours * 3600 seconds = 43200 seconds), the following response header will be sent back.

HTTP/1.1 200 OK
...
Cache-Control: max-age=43200
...

IIS 6.0 will use the "Expires" Header if you set the exact date on which contents should expire.

0

精彩评论

暂无评论...
验证码 换一张
取 消