<?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; deflate</title>
	<atom:link href="http://blog.it580.com/tag/deflate/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.it580.com</link>
	<description>一个IT从业者的枫言枫语</description>
	<lastBuildDate>Tue, 09 Mar 2010 07:03:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>zh</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>优化网站的载入速度</title>
		<link>http://blog.it580.com/1457</link>
		<comments>http://blog.it580.com/1457#comments</comments>
		<pubDate>Fri, 10 Oct 2008 02:54:59 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[手记]]></category>
		<category><![CDATA[deflate]]></category>
		<category><![CDATA[expires]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.it580.com/1457</guid>
		<description><![CDATA[最近朋友们反映网站速度比较慢，检查并处理了一下。检查发现:

空间商关闭了网站压缩
网站没有设置Expires

1.开启压缩功能,编辑.htaccess文件,加入如下代码:
&#60;ifmodule mod_deflate.c&#62;
AddOutputFilter DEFLATE html xml php js css
&#60;/ifmodule&#62;

如果不支持deflate,可以开启gzip。
&#60;IfModule mod_gzip.c&#62;     &#160; mod_gzip_on Yes      &#160; mod_gzip_dechunk Yes      &#160; mod_gzip_item_include file \.(html?&#124;txt&#124;css&#124;js&#124;php&#124;pl)$      &#160; mod_gzip_item_include handler ^cgi-script$      &#160; mod_gzip_item_include mime ^text/.*     [...]]]></description>
			<content:encoded><![CDATA[<p>最近朋友们反映网站速度比较慢，检查并处理了一下。检查发现:</p>
<ol>
<li>空间商关闭了网站压缩</li>
<li>网站没有设置Expires</li>
</ol>
<p>1.开启压缩功能,编辑.htaccess文件,加入如下代码:</p>
<blockquote><p>&lt;ifmodule mod_deflate.c&gt;</p>
<p>AddOutputFilter DEFLATE html xml php js css</p>
<p>&lt;/ifmodule&gt;</p>
</blockquote>
<p>如果不支持deflate,可以开启gzip。</p>
<blockquote><p>&lt;IfModule mod_gzip.c&gt;     <br />&#160; mod_gzip_on Yes      <br />&#160; mod_gzip_dechunk Yes      <br />&#160; mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$      <br />&#160; mod_gzip_item_include handler ^cgi-script$      <br />&#160; mod_gzip_item_include mime ^text/.*      <br />&#160; mod_gzip_item_include mime ^application/x-javascript.*      <br />&#160; mod_gzip_item_exclude mime ^image/.*      <br />&#160; mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*      <br />&lt;/IfModule&gt;</p>
</blockquote>
<p>2.设置Expires,编辑.htaccess,加入如下代码:</p>
<blockquote><p>&lt;FilesMatch &quot;\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$&quot;&gt;     <br />Header set Cache-Control &quot;public&quot;      <br />Header set Expires &quot;Thu, 15 Apr 2010 20:00:00 GMT&quot;      <br />&lt;/FilesMatch&gt;</p>
</blockquote>
<p>修改后,网站速度提升50%左右。</p>
<img src="http://blog.it580.com/?ak_action=api_record_view&id=1457&type=feed" alt="" /><hr />
<p><small>© David for <a href="http://blog.it580.com">空想枫</a>, 2008. |
<a href="http://blog.it580.com/1457">Permalink</a> |
<a href="http://blog.it580.com/1457#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://blog.it580.com/1457&title=优化网站的载入速度">del.icio.us</a>
<br/>
</small></p>
	Tags: <a href="http://blog.it580.com/tag/deflate" title="deflate" rel="tag nofollow">deflate</a>, <a href="http://blog.it580.com/tag/expires" title="expires" rel="tag nofollow">expires</a>, <a href="http://blog.it580.com/tag/gzip" title="gzip" rel="tag nofollow">gzip</a>, <a href="http://blog.it580.com/tag/htaccess" title="htaccess" rel="tag nofollow">htaccess</a>, <a href="http://blog.it580.com/tag/website" title="website" rel="tag nofollow">website</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.it580.com/1288" title="Dropbox:备份,分享,协作免费空间 (2008 7-15)">Dropbox:备份,分享,协作免费空间</a> (3)</li>
	<li><a href="http://blog.it580.com/1263" title="秘密消息网站-读后自毁 (2008 7-6)">秘密消息网站-读后自毁</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.it580.com/1457/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
