自從用了HttpCompress後,網頁打開速度明顯快了很多,但在javascript的應用(包括Validation控件)、FreeTextBox 控件的使用中還是出現了error。下面就針對這兩種error,給出解決方法。
在web.config中
<httpCompress preferredAlgorithm="gzip" compressionLevel="high">
<excludedMimeTypes>
<add type="image/jpeg"/>
<add type="image/gif"/>
<add type="text/x-component" /> <!-- 解決 FreeTextBox 出錯的問題-->
</excludedMimeTypes>
<excludedPaths>
<add path="NoCompress.aspx"/>
<add path="ebResource.axd"/> <!-- 解決 javascript 出錯的問題-->
</excludedPaths>
</httpCompress>
本文轉自94cool部落格園部落格,原文連結:http://www.cnblogs.com/94cool/articles/1524820.html,如需轉載請自行聯系原作者