<?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; cookie</title>
	<atom:link href="http://zzfei.com/tag/cookie/feed/" rel="self" type="application/rss+xml" />
	<link>http://zzfei.com</link>
	<description>be happy</description>
	<lastBuildDate>Mon, 23 Jan 2012 14:05:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cookie，子目录和子域名等</title>
		<link>http://zzfei.com/cookie-sudomains-subdirectories/</link>
		<comments>http://zzfei.com/cookie-sudomains-subdirectories/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:08:55 +0000</pubDate>
		<dc:creator>zhy</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://zzfei.com/?p=165</guid>
		<description><![CDATA[感觉Kangzj的文章很不错，讲解的都挺详细的，WordPress优化的几篇文章完全可以用来做指南了。

先从html代码层次加速WordPress说起，第10点 Used Cookie Free Domains  – 用不会传递Cookie的域名，大猫建议用加www的域名作为博客网址，不过Kangzj说可以在wp-config.php，用如下代码设置cookie的作用范围，这样子域名就是cookie free了



<span class="readmore"><a href="http://zzfei.com/cookie-sudomains-subdirectories/" title="Cookie，子目录和子域名等">阅读全文——共1208字</a></span>]]></description>
			<content:encoded><![CDATA[<p>感觉<a title="Kangzj" href="http://kangzj.net">Kangzj</a>的文章很不错，讲解的都挺详细的，WordPress优化的几篇文章完全可以用来做指南了。</p>
<p>先<a title="从html代码层次加速WordPress" href="http://kangzj.net/to-accelerate-wordpress-on-html-level/">从html代码层次加速WordPress</a>说起，第10点 Used Cookie Free Domains  – 用不会传递Cookie的域名，<a title="Cookie-free Domains Yslow 极限页面性能优化" href="http://ooxx.me/cookie-free-domains-yslow.orz">大猫建议</a>用加www的域名作为博客网址，不过Kangzj说可以在wp-config.php，用如下代码设置cookie的作用范围，这样子域名就是cookie free了</p>
<blockquote>
<pre style="font-family: monospace;">define('COOKIE_DOMAIN', 'zzfei.com');</pre>
</blockquote>
<p><span id="more-165"></span>无奈打开wp-config.php，没发现这个设置，然后找到WordPress的官方文档 <a title="Editing wp-config.php Set_Cookie_Domain" href="http://codex.wordpress.org/Editing_wp-config.php#Set_Cookie_Domain">Editing wp-config.php</a>，中文翻译的都不好，关于Set Cookie Domain的描述如下：</p>
<blockquote>
<h3>Set Cookie Domain</h3>
<p>The domain set in the cookies for WordPress can be specified for those with unusual domain setups. One reason is if <a title="http://www.askapache.com/htaccess/apache-speed-subdomains.html" href="http://www.askapache.com/htaccess/apache-speed-subdomains.html">subdomains are used to serve static content</a>. To prevent WordPress cookies from being sent with each request to static content on your subdomain you can set the cookie domain to your non-static domain only.</p>
<pre>define('COOKIE_DOMAIN', 'www.askapache.com');</pre>
</blockquote>
<p> 然后发现这篇文章 <a title="Speed Tips: Use Multiple=" href="http://www.askapache.com/htaccess/apache-speed-subdomains.html">Speed Tips: Use Multiple SubDomains</a>，讲述使用多个域名对加快网站速度的好处—其实讲的很生动，如果翻译的不好，未必更容易理解。感觉这个作者够牛X啊，页面如此简洁，如此不羁，那些个代码几乎没有排版。他确实也说了这个网站是给高级一点的用户看的。</p>
<p> 再看到 <a title="Search Engine Optimisation and multiple=" href="http://stackoverflow.com/questions/1161718/search-engine-optimisation-and-multiple-sub-domains-per-html-page">Search Engine Optimisation and multiple sub-domains per html page</a>，子域名和SEO相关的问题，除了上面的文章链接，还有其他几个：<a title="50 SEO tips for online retailers" href="http://econsultancy.com/blog/3559-50-seo-tips-for-online-retailers">50 SEO tips for online retailers</a>，<a title="Subdomains or Subfolders : Which are Better for SEO?" href="http://www.searchenginejournal.com/subdomains-or-subfolders-which-are-better-for-seo/6849/">Subdomains or Subfolders : Which are Better for SEO?</a>(这篇文章看了下，看太不懂)，<a title="Root Domains, Subdomains vs. Subfolders and The Microsite Debate" href="http://www.seomoz.org/blog/understanding-root-domains-subdomains-vs-subfolders-microsites">Root Domains, Subdomains vs. Subfolders and The Microsite Debate</a>。这几篇文章全英文又专业，要看懂还要等以后了，这儿先留个链接。</p>
<p>最后找到Google的人对子域名和子目录的看法：<a title="Matt Cutts: Gadgets, Google, and SEO" href="http://www.mattcutts.com/blog/subdomains-and-subdirectories/">Matt Cutts: Gadgets, Google, and SEO</a>，还有两份中文翻译 <a href="http://www.google.com/support/forum/p/webmasters/thread?tid=70d28d5141052231&amp;hl=zh-CN">二级域名和目录哪个权重更高</a>，Google中文网站管理员博客：<a href="http://www.googlechinawebmaster.com/2008/01/blog-post_20.html">子域名和子目录</a></p>
<p>那么子域名和子目录道理哪个更利于SEO？等翻译了这些英文文章，再来分解:evil:</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010 年 05 月 17 日 -- <a href="http://zzfei.com/learn-about-seo-bible/" title="【转载】来自SEO教皇的圣经 – SEO优秀经验学习">【转载】来自SEO教皇的圣经 – SEO优秀经验学习</a> (7)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://zzfei.com/cookie-sudomains-subdirectories/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

