<?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; expires</title>
	<atom:link href="http://blog.it580.com/tag/expires/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.it580.com</link>
	<description>一个IT业者的博客</description>
	<lastBuildDate>Thu, 02 Sep 2010 02:09:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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[
	
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
	<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 1 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-9062854815484229"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text_image";
		google_ad_channel ="8267681930"; google_color_border = "000000";
		google_color_link = "FFFFFF"; google_color_bg = "000000";
		google_color_text = "CCCCCC"; google_color_url = "999999";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
	
	<!-- google ad injected by adsense-optimizer http://www.adsenseoptimizer.de -->
	<div  style="padding:7px; display: block; margin-left: auto; margin-right: auto; text-align: center;"><!-- Ad number: 2 --><script type="text/javascript"><!--
    	 
    	google_ad_client = "pub-9062854815484229"; google_alternate_color = "FFFFFF";
		google_ad_width = 468; google_ad_height = 60;
		google_ad_format = "468x60_as"; google_ad_type = "text_image";
		google_ad_channel ="8267681930"; google_color_border = "000000";
		google_color_link = "FFFFFF"; google_color_bg = "000000";
		google_color_text = "CCCCCC"; google_color_url = "999999";
		google_ui_features = "rc:0"; //--></script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>最近朋友们反映网站速度比较慢，检查并处理了一下。检查发现: 空间商关闭了网站压缩 网站没有设置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/.* &#160; mod_gzip_item_include mime ^application/x-javascript.* &#160; mod_gzip_item_exclude mime ^image/.* &#160; mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* &#60;/IfModule&#62; 2.设置Expires,编辑.htaccess,加入如下代码: &#60;FilesMatch &#34;\.(ico&#124;pdf&#124;flv&#124;jpg&#124;jpeg&#124;png&#124;gif&#124;js&#124;css&#124;swf)$&#34;&#62; Header set Cache-Control &#34;public&#34; [...]


Related posts:<ol><li><a href='http://blog.it580.com/961' rel='bookmark' title='Permanent Link: wordpress在nginx下的rewrite设置'>wordpress在nginx下的rewrite设置</a></li>
<li><a href='http://blog.it580.com/437' rel='bookmark' title='Permanent Link: links for 2006-07-07'>links for 2006-07-07</a></li>
<li><a href='http://blog.it580.com/440' rel='bookmark' title='Permanent Link: links for 2006-07-10'>links for 2006-07-10</a></li>
<li><a href='http://blog.it580.com/433' rel='bookmark' title='Permanent Link: links for 2006-07-05'>links for 2006-07-05</a></li>
<li><a href='http://blog.it580.com/441' rel='bookmark' title='Permanent Link: links for 2006-07-11'>links for 2006-07-11</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><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>
<!-- google_ad_section_end --> <img src="http://blog.it580.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1457" width="1" height="1" style="display: none;" />

<p>Related posts:<ol><li><a href='http://blog.it580.com/961' rel='bookmark' title='Permanent Link: wordpress在nginx下的rewrite设置'>wordpress在nginx下的rewrite设置</a></li>
<li><a href='http://blog.it580.com/437' rel='bookmark' title='Permanent Link: links for 2006-07-07'>links for 2006-07-07</a></li>
<li><a href='http://blog.it580.com/440' rel='bookmark' title='Permanent Link: links for 2006-07-10'>links for 2006-07-10</a></li>
<li><a href='http://blog.it580.com/433' rel='bookmark' title='Permanent Link: links for 2006-07-05'>links for 2006-07-05</a></li>
<li><a href='http://blog.it580.com/441' rel='bookmark' title='Permanent Link: links for 2006-07-11'>links for 2006-07-11</a></li>
</ol></p><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/>
Post tags: <a href="http://blog.it580.com/tag/deflate" rel="tag">deflate</a>, <a href="http://blog.it580.com/tag/expires" rel="tag">expires</a>, <a href="http://blog.it580.com/tag/gzip" rel="tag">gzip</a>, <a href="http://blog.it580.com/tag/htaccess" rel="tag">htaccess</a>, <a href="http://blog.it580.com/tag/website" rel="tag">website</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://blog.it580.com/1457/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
