久久五月婷婷综合,欧美三级亚洲,久久偷人,国产精品污网站,欧美一级二级在线观看,欧美综合一区,国产欧美综合一区

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

6854

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

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

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

第二步:?jiǎn)⒂脀eb服務(wù)

 

第三步:修改MetaBase.xml
 開(kāi)始 > 運(yùn)行中輸入 c:\windows\system32\inetsrv,找到 MeteBase.xml,先備份,在修改。(有的服務(wù)器不需要修改此文件便可以使用)
搜索 Location ="/LM/W3SVC/Filters/Compression/gzip"
仔細(xì)核對(duì)下代碼:
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,保存好后再啟動(dòng)IIS。這樣Gzip壓縮就啟用成功了。
最后,測(cè)試Gzip壓縮是否成功,可以到站長(zhǎng)工具網(wǎng)站上的Gzip進(jìn)行檢測(cè)。