专注SEO、SEM、百度排名、快速提升权重、关键字优化、网络推广,seo莫然可以分享移动手机端SEO知识!免费提供网站优化诊断。 
 莫然博客是山东省最主流,最具人气的莫然seo博客频道。专注SEO、SEM、百度排名、快速提升权重、关键字优化、网络推广,seo莫然可以分享移动手机端SEO知识!免费提供网站优化诊断。

网页启用Gzip压缩 提高浏览速度

作者:seo , 分类:SEO资讯 , 浏览:202 , 评论:0
Gzip压缩我很早已经就启用了,不过从未与大家分享过。近期由于,临时更换服务器,结果忘了启用Gzip压缩,周末利用空余时间启用了Gzip压缩,并把全部过程记录下来,与大家分享。,,它的好处显而易见,提高网页浏览速度,无论是之前说的 精简代码、都不如启用Gzip来的实在。下图为启用Gzip后的效果。,,Gzip压缩效率非常高,通常可以达到70%的压缩率,也就是说,如果你的网页有30K,压缩之后就变成了9K左右。,,,右击\"\"->\"属性\",选择\"服务\"。在\"HTTP压缩\"框中选中\"压缩应用程序文件\"和\" 压缩静态文件\",按需要设置\"临时目录\"和\"临时目录的最大限制\";,,,,开始 > 运行中输入 c:\\windows\\system32\\inetsrv,找到 MeteBase.xml,先备份,在修改。(有的服务器不需要修改此文件便可以使用),搜索 Location =\"/LM/W3SVC/Filters/Compression/gzip\",仔细核对下代码:, <IIsCompressionScheme Location =\"/LM/W3SVC/Filters/Compression/deflate\"
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\"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location =\"/LM/W3SVC/Filters/Compression/gzip\"
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\"
>
</IIsCompressionScheme>,,<IIsCompressionScheme Location =\"/LM/W3SVC/Filters/Compression/gzip\"
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\"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location =\"/LM/W3SVC/Filters/Compression/deflate\"
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\"
>
</IIsCompressionScheme>,修改好后,在服务中停止IIS Admin Service 服务.,,然后在保存MeteBase.xml,保存好后再启动IIS。这样Gzip压缩就启用成功了。,最后,测试Gzip压缩是否成功,可以到 站长工具进行检测。,,本文仅针对windows的IIS服务器上演示的,VPS、独立服务器均可以实现,虚拟主机用户需要咨询空间商(一般虚拟主机都启用了Gzip)如果你的站在启用Gzip压缩时遇到了困难,可在此跟帖评论与交流,我会竭尽全力为大家解答。,,本文地址:
莫然博客是山东省最主流,最具人气的莫然seo博客频道。专注SEO、SEM、百度排名、快速提升权重、关键字优化、网络推广,seo莫然可以分享移动手机端SEO知识!免费提供网站优化诊断。