精品国产一二三四,国产伦精品一区,人人澡超碰碰97碰碰碰,成年人免费网站在线观看,99国产精品久久久,欧美精品在线第一页,日韩干b

服務(wù)器采用啟用Gzip壓縮來提高網(wǎng)站瀏覽速度

6922

 Gzip壓縮效率非常高,通??梢赃_(dá)到70%的壓縮率,也就是說,如果你的網(wǎng)頁有30K,壓縮之后就變成了9K左右。

第一步:打開IIS,啟用HTTP壓縮服務(wù)

右擊"網(wǎng)站"->"屬性",選擇"服務(wù)"。在"HTTP壓縮"框中選中"壓縮應(yīng)用程序文件"和" 壓縮靜態(tài)文件",按需要設(shè)置"臨時(shí)目錄"和"臨時(shí)目錄的最大限制";

第二步:啟用web服務(wù)

 

第三步:修改MetaBase.xml
 開始 > 運(yùn)行中輸入 c:\windows\system32\inetsrv,找到 MeteBase.xml,先備份,在修改。(有的服務(wù)器不需要修改此文件便可以使用)
搜索 Location ="/LM/W3SVC/Filters/Compression/gzip"
仔細(xì)核對下代碼:
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" 
HcCreateFlags="0" 
HcDoDynamicCompression="TRUE" 
HcDoOnDemandCompression="TRUE" 
HcDoStaticCompression="FALSE" 
HcDynamicCompressionLevel="0" 
HcFileExtensions="htm 
html 
txt" 
HcOnDemandCompLevel="10" 
HcPriority="1" 
HcScriptFileExtensions="asp 
dll 
exe" 
 
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" 
HcCreateFlags="1" 
HcDoDynamicCompression="TRUE" 
HcDoOnDemandCompression="TRUE" 
HcDoStaticCompression="TRUE" 
HcDynamicCompressionLevel="0" 
HcFileExtensions="htm 
html 
txt" 
HcOnDemandCompLevel="10" 
HcPriority="1" 
HcScriptFileExtensions="asp 
dll 
exe" 
替換成: 
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" 
HcCreateFlags="1" 
HcDoDynamicCompression="TRUE" 
HcDoOnDemandCompression="TRUE" 
HcDoStaticCompression="TRUE" 
HcDynamicCompressionLevel="10" 
HcFileExtensions="html 
css 
js 
htm 
xml 
txt" 
HcOnDemandCompLevel="10" 
HcPriority="1" 
HcScriptFileExtensions="php 
dll" 
 
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" 
HcCreateFlags="2" 
HcDoDynamicCompression="TRUE" 
HcDoOnDemandCompression="TRUE" 
HcDoStaticCompression="TRUE" 
HcDynamicCompressionLevel="10" 
HcFileExtensions="html 
css 
js 
htm 
xml 
txt" 
HcOnDemandCompLevel="10" 
HcPriority="1" 
HcScriptFileExtensions="php 
dll" 
 
 
修改好后,在服務(wù)中停止IIS Admin Service 服務(wù)。
然后在保存MeteBase.xml,保存好后再啟動IIS。這樣Gzip壓縮就啟用成功了。
最后,測試Gzip壓縮是否成功,可以到站長工具網(wǎng)站上的Gzip進(jìn)行檢測。