<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>落雪实验室 &#187; 页面压缩</title>
	<atom:link href="http://www.fallensnow.net/index.php/archives/tag/%e9%a1%b5%e9%9d%a2%e5%8e%8b%e7%bc%a9/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fallensnow.net</link>
	<description>收藏分享精品软件与技术-关注互联网、操作系统与搜索引擎</description>
	<lastBuildDate>Sat, 20 Nov 2010 16:33:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>打开Windows 2003 IIS6.0中打开Gzip压缩以提高站点运行效率</title>
		<link>http://www.fallensnow.net/index.php/archives/875</link>
		<comments>http://www.fallensnow.net/index.php/archives/875#comments</comments>
		<pubDate>Sat, 22 Aug 2009 22:27:57 +0000</pubDate>
		<dc:creator>落雪</dc:creator>
				<category><![CDATA[技术教程]]></category>
		<category><![CDATA[服务器环境相关]]></category>
		<category><![CDATA[Gzip]]></category>
		<category><![CDATA[windows server 2003]]></category>
		<category><![CDATA[windows server 2008]]></category>
		<category><![CDATA[页面压缩]]></category>

		<guid isPermaLink="false">http://www.fallensnow.com.cn/index.php/archives/875</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; 一篇老文章，但是很有用，留下来，顺便做过两天Server2008 R2的测试参考。现在主流浏览器基本都支持 Gzip 压缩，因此这也成了 WebServer 优化策略的一种常规手段。启用压缩后能有效减少网页传输数据大小，使得有限带宽能提供更多的请求，并在一定程度上提高了网页 &#34;显示&#34; 速度。IIS6 提供了对 Gzip 的支持，只可惜有点不完善，需要我们自己手工做些设置。

 

具体步骤：    1. 在 &#34;IIS 管理器&#34; 中，打开 &#34;网站 &#62; 属性&#34; 对话框，切换到 &#34;服务&#34; 页卡，选中两个压缩选项。        2. 新增一个服务扩展，路径为 &#34;%windir%\System32\inetsrv\gzip.dll&#34;。添加完成后，允许该扩展使用。        3. 在 &#34;管理工具 &#62; 服务&#34; 中，停止 &#34;IIS Admin Service&#34;。        4. 用记事本打开 &#34;%windir%\system32\inetsrv\MetaBase.xml&#34;，找到 &#34;IIsCompressionScheme&#34;，按下述方法修改、保存。(建议修改前先做备份)    &#160;&#160;&#160;&#160;&#160;&#160; 如果需要压缩动态文件，则将 HcDoDynamicCompression设置为&#34;TRUE&#34;，并在HcScriptFileExtensions中增加您要压缩的动态文件后缀名，如aspx (由于我要优化的系统中，做了 html -&#62; aspx 的 URL Rewrite，所以将 html、htm 也加入了)。    &#160;&#160;&#160;&#160;&#160;&#160;&#160; 如果需要压缩静态文件，则将HcDoStaticCompression和HcDoOnDemandCompression设置为 &#34;TRUE&#34;，并在HcFileExtensions中增加您需要压缩的静态文件后缀名，如xml、css等。     HcDynamicCompressionLevel和HcOnDemandCompLevel表示需要的压缩率，数字(0~9)越小压缩率越低。        5. 重启服务器。    

<span class="readmore"><a href="http://www.fallensnow.net/index.php/archives/875" title="打开Windows 2003 IIS6.0中打开Gzip压缩以提高站点运行效率">阅读全文——共905字</a></span>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 一篇老文章，但是很有用，留下来，顺便做过两天Server2008 R2的测试参考。现在主流浏览器基本都支持 Gzip 压缩，因此这也成了 WebServer 优化策略的一种常规手段。启用压缩后能有效减少网页传输数据大小，使得有限带宽能提供更多的请求，并在一定程度上提高了网页 &quot;显示&quot; 速度。IIS6 提供了对 Gzip 的支持，只可惜有点不完善，需要我们自己手工做些设置。</p>
<p> <span id="more-875"></span>
<p><strong>具体步骤：</strong>    <br />1. 在 &quot;IIS 管理器&quot; 中，打开 &quot;网站 &gt; 属性&quot; 对话框，切换到 &quot;服务&quot; 页卡，选中两个压缩选项。    <br /><a href="http://www.rainsts.net/uploads/200708/11_160916_2.gif"><img border="0" src="http://www.rainsts.net/uploads/200708/11_160916_2.gif" width="550" /></a>    <br />2. 新增一个服务扩展，路径为 &quot;%windir%\System32\inetsrv\gzip.dll&quot;。添加完成后，允许该扩展使用。    <br /><a href="http://www.rainsts.net/uploads/200708/11_160921_3.gif"><img border="0" src="http://www.rainsts.net/uploads/200708/11_160921_3.gif" width="550" /></a>    <br />3. 在 &quot;管理工具 &gt; 服务&quot; 中，停止 &quot;IIS Admin Service&quot;。    <br /><img border="0" src="http://www.rainsts.net/uploads/200708/11_160927_4.gif" />    <br />4. 用记事本打开 &quot;%windir%\system32\inetsrv\MetaBase.xml&quot;，找到 &quot;IIsCompressionScheme&quot;，按下述方法修改、保存。(建议修改前先做备份)    <br />&#160;&#160;&#160;&#160;&#160;&#160; 如果需要压缩动态文件，则将 HcDoDynamicCompression设置为&quot;TRUE&quot;，并在HcScriptFileExtensions中增加您要压缩的动态文件后缀名，如aspx (由于我要优化的系统中，做了 html -&gt; aspx 的 URL Rewrite，所以将 html、htm 也加入了)。    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; 如果需要压缩静态文件，则将HcDoStaticCompression和HcDoOnDemandCompression设置为 &quot;TRUE&quot;，并在HcFileExtensions中增加您需要压缩的静态文件后缀名，如xml、css等。     <br />HcDynamicCompressionLevel和HcOnDemandCompLevel表示需要的压缩率，数字(0~9)越小压缩率越低。    <br /><a href="http://www.rainsts.net/uploads/200708/11_160932_5.gif"><img border="0" src="http://www.rainsts.net/uploads/200708/11_160932_5.gif" width="550" /></a>    <br />5. 重启服务器。    <br /><strong></strong></p>
<p><strong>测试</strong>    <br />我们用 HttpWatch Professional 4.1 看看启用 GZip 后的效果。</p>
<p>当然也可以使用最知名的验证网站来验证，网址是<a href="http://www.pipeboost.com">http://www.pipeboost.com</a>，<a title="http://tool.chinaz.com/Gzips/Default.aspx" href="http://tool.chinaz.com/Gzips/Default.aspx">http://tool.chinaz.com/Gzips/Default.aspx</a>（Chinaz）都可以    <br /><img border="0" src="http://www.rainsts.net/uploads/200708/11_160937_6.gif" /></p>
<p><img title="点击查看大图" alt="启用Gzip压缩十二" src="http://www.juyo.org/upload/2009/2/gzip-12.gif" width="533" height="550" />    <br />看来效果非常不错。</p>
<h2  class="related_post_title">落雪猜您还对以下文章感兴趣：</h2><ul class="related_post"><li>2009/08/16 -- <a href="http://www.fallensnow.net/index.php/archives/828" title="推荐一款免费服务器、VPS主机 IIS 站点流量监控软件">推荐一款免费服务器、VPS主机 IIS 站点流量监控软件</a></li><li>2009/08/05 -- <a href="http://www.fallensnow.net/index.php/archives/594" title="关于windows 7 RTM 与Windows Server 2008 R2 RTM的一些说明">关于windows 7 RTM 与Windows Server 2008 R2 RTM的一些说明</a></li><li>2009/06/03 -- <a href="http://www.fallensnow.net/index.php/archives/269" title="微软宣布Windows Server 2008 R2发售日期">微软宣布Windows Server 2008 R2发售日期</a></li><li>2009/02/23 -- <a href="http://www.fallensnow.net/index.php/archives/68" title="Windows 2008 server(Win+Apache+Mysql+PHP)环境 架设教程图文教程">Windows 2008 server(Win+Apache+Mysql+PHP)环境 架设教程图文教程</a></li><li>2008/12/06 -- <a href="http://www.fallensnow.net/index.php/archives/48" title="Windows2003 Web主目录权限分配技巧">Windows2003 Web主目录权限分配技巧</a></li></ul>
	标签：<a href="http://www.fallensnow.net/index.php/archives/tag/gzip" title="Gzip" rel="tag nofollow">Gzip</a>, <a href="http://www.fallensnow.net/index.php/archives/category/servers" title="服务器环境相关" rel="tag nofollow">服务器环境相关</a>, <a href="http://www.fallensnow.net/index.php/archives/category/resources" title="技术教程" rel="tag nofollow">技术教程</a>, <a href="http://www.fallensnow.net/index.php/archives/tag/%e9%a1%b5%e9%9d%a2%e5%8e%8b%e7%bc%a9" title="页面压缩" rel="tag nofollow">页面压缩</a>, <a href="http://www.fallensnow.net/index.php/archives/tag/windows-server-2008" title="windows server 2008" rel="tag nofollow">windows server 2008</a>, <a href="http://www.fallensnow.net/index.php/archives/tag/windows-server-2003" title="windows server 2003" rel="tag nofollow">windows server 2003</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.fallensnow.net/index.php/archives/875/feed</wfw:commentRss>
		<slash:comments>2063</slash:comments>
		</item>
	</channel>
</rss>

