0
我願意服務與gzip壓縮缺少即使日誌顯示它的工作
我使用的是IIS 7.5和啓用了動態和靜態內容壓縮.js文件。
在IIS日誌中我可以看到下面的日誌這表明它似乎是工作,因爲它顯示「內容編碼:gzip」中的「GENERAL_RESPONSE_HEADERS」事件
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>4</Level>
<Opcode>47</Opcode>
<Keywords>0x0</Keywords>
<TimeCreated SystemTime="2017-03-29T23:40:41.555Z"/>
<Correlation ActivityID="{8000000D-0003-FA00-B63F-84710C7967BB}"/>
<Execution ProcessID="12296" ThreadID="13868"/>
<Computer>AUD64909W0</Computer>
</System>
<EventData>
<Data Name="ContextId">{8000000D-0003-FA00-B63F-84710C7967BB}</Data>
<Data Name="Headers">Transfer-Encoding: chunked
Content-Type: application/javascript
Content-Encoding: gzip
Last-Modified: Wed, 29 Mar 2017 20:33:32 GMT
Accept-Ranges: bytes
ETag: "d6af72bbcba8d21:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
</Data>
</EventData>
<RenderingInfo Culture="en-NZ">
<Opcode>GENERAL_RESPONSE_HEADERS</Opcode>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
</ExtendedTracingInfo>
</Event>
但是響應頭時在Fiddler或Chrome開發工具中查看未顯示內容編碼。
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/javascript
Last-Modified: Wed, 29 Mar 2017 20:33:32 GMT
Accept-Ranges: bytes
ETag: "d6af72bbcba8d21:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Thu, 30 Mar 2017 00:57:20 GMT
任何想法,爲什麼這不工作