<?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; Apache</title>
	<atom:link href="http://ray.imiddle.net/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://ray.imiddle.net</link>
	<description>狂人的成长史</description>
	<lastBuildDate>Thu, 17 Nov 2011 01:01:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>用.htaccess让文件自动下载而不是打开</title>
		<link>http://ray.imiddle.net/2010/06/force-files-to-download-with-htaccess/</link>
		<comments>http://ray.imiddle.net/2010/06/force-files-to-download-with-htaccess/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 15:16:10 +0000</pubDate>
		<dc:creator>Ray</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://ray.imiddle.net/2010/06/09/%e7%94%a8-htaccess%e8%ae%a9%e6%96%87%e4%bb%b6%e8%87%aa%e5%8a%a8%e4%b8%8b%e8%bd%bd%e8%80%8c%e4%b8%8d%e6%98%af%e6%89%93%e5%bc%80/</guid>
		<description><![CDATA[&#60;FilesMatch "\.(?i:doc&#124;odf&#124;pdf&#124;rtf&#124;txt)$"&#62; Header set Content-Disposition attachment &#60;/FilesMatch&#62;]]></description>
			<content:encoded><![CDATA[<p><code><br />
</code><code>&lt;FilesMatch "\.(?i:doc|odf|pdf|rtf|txt)$"&gt;<br />
Header set  Content-Disposition attachment<br />
&lt;/FilesMatch&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ray.imiddle.net/2010/06/force-files-to-download-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用PHP来动态生成CSS/JS</title>
		<link>http://ray.imiddle.net/2009/03/generate-css-js-with-php/</link>
		<comments>http://ray.imiddle.net/2009/03/generate-css-js-with-php/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 07:37:17 +0000</pubDate>
		<dc:creator>Ray</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://ray.imiddle.net/?p=531</guid>
		<description><![CDATA[对于一个网站其实很多时候都需要对动态的生成所使用的CSS/JS，其中主要是CSS/JS中所包含的一些URL，当然这些URL信息也可以使用相对路径来实现，但在一些情况下使用相对路径并不能解决这个难题。 按照Yahoo YSlow（http://developer.yahoo.com/yslow/help）的建议1，就是必须减少HTTP的请求，当然手动把所有代码合并是一种方法，但这种方法反而会带来两个更糟的问题，把所有CSS/JS都合并到一个文件中，当然不利于代码的阅读和管理。如果使用jQuery，因为不同的Plugin都是会放在不同的js文件中，和Yahoo YSlow的建议有较大的冲突，当然是用动态语言来合并这些js文件应该是个不错的idea。合并过程中还可以使用jsmin.php来进行js文件的压缩。 如想使用这个技术可参考以下的几篇说明： Automatic merging and versioning of CSS/JS files with PHP Adding JSMin to my CSS/JS merging script (这篇写了一般，其实有更好的方法来做) GZip files with .htaccess and PHP (这篇是说明如何对输出的PHP内容进行GZip的压缩，因为动态文件无法使用Apache 的 GZIP的库来压缩，所以为了节省传递数据必须在PHP中把输出内容进行压缩)。]]></description>
			<content:encoded><![CDATA[<p>对于一个网站其实很多时候都需要对动态的生成所使用的CSS/JS，其中主要是CSS/JS中所包含的一些URL，当然这些URL信息也可以使用相对路径来实现，但在一些情况下使用相对路径并不能解决这个难题。</p>
<p>按照Yahoo YSlow（<a href="http://developer.yahoo.com/yslow/help">http://developer.yahoo.com/yslow/help</a>）的建议1，就是必须减少HTTP的请求，当然手动把所有代码合并是一种方法，但这种方法反而会带来两个更糟的问题，把所有CSS/JS都合并到一个文件中，当然不利于代码的阅读和管理。如果使用jQuery，因为不同的Plugin都是会放在不同的js文件中，和Yahoo YSlow的建议有较大的冲突，当然是用动态语言来合并这些js文件应该是个不错的idea。合并过程中还可以使用jsmin.php来进行js文件的压缩。</p>
<p>如想使用这个技术可参考以下的几篇说明：</p>
<ol>
<li><a href="http://www.ejeliot.com/blog/72" target="_blank">Automatic merging and versioning of CSS/JS files with PHP</a></li>
<li><a href="http://www.ejeliot.com/blog/73">Adding JSMin to my CSS/JS merging script</a> (这篇写了一般，其实有更好的方法来做<a href="http://www.ejeliot.com/blog/73">)</a></li>
<li><a href="http://www.lateralcode.com/2008/12/gzip-files-with-htaccess-and-php/" target="_blank">GZip files with .htaccess and PHP</a> (这篇是说明如何对输出的PHP内容进行GZip的压缩，因为动态文件无法使用Apache 的 GZIP的库来压缩，所以为了节省传递数据必须在PHP中把输出内容进行压缩)。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ray.imiddle.net/2009/03/generate-css-js-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

