<?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.canfree.com/tag/%e4%bc%98%e5%8c%96/feed" rel="self" type="application/rss+xml" /><link>http://www.canfree.com</link> <description>博优谷是知名的IT评论博客，探讨网站优化，网上赚钱，免费资源，站长工具，站长新闻等资讯</description> <lastBuildDate>Sun, 05 Feb 2012 15:46: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>教你如何解决重复的元说明</title><link>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm</link> <comments>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm#comments</comments> <pubDate>Sun, 20 Mar 2011 09:14:09 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[优化]]></category> <category><![CDATA[元说明]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1215</guid> <description><![CDATA[在用GOOGLE的网站管理员工具分析站点时发现存在重复的元说明，关于这个问题，一个比较方便的解决方法就是指定规范网页，规范网页是一组内容高度相似的网页的首选版本。 如何指定规范网页？ 要指定指向网页 http://www.example.com/product.php?item=swedish-fish 的规范链接，请按以下形式创建 &#60;link&#62; 元素： &#160; &#60;link rel=&#34;canonical&#34; href=&#34;http://www.example.com/product.php?item=swedish-fish&#34;/&#62;将上述链接复制到该网页所有非规范版本的 &#60;head&#62; 部分，如 http://www.example.com/product.php?item=swedish-fish&#38;sort=price。 &#160; 如果您在 http://www.example.com/product.php?item=swedish-fish 和 https://www.example.com/product.php?item=swedish-fish 上都发布了内容，则可以指定该网页的规范版本。创建 &#60;link&#62; 元素： &#160; &#60;link rel=&#34;canonical&#34; href=&#34;http://www.example.com/product.php?item=swedish-fish&#34;/&#62;将上述链接添加到 https://www.example.comproduct.php?item=swedish-fish 的 &#60;head&#62; 部分。 对于wordpress用户来说，可以用下面的方法来消除重复元说明方法，header.php 中加以下代码： 将代码添加到&#60;head&#62;部分: &#60;?php if &#40; is_singular&#40;&#41; &#41; echo '&#60;link rel=&#34;canonical&#34; href=&#34;' . get_permalink&#40;&#41; . '&#34; /&#62;';?&#62;]]></description> <content:encoded><![CDATA[<p>在用GOOGLE的网站管理员工具分析站点时发现存在<strong>重复的元说明</strong>，关于这个问题，一个比较方便的解决方法就是指定规范网页，规范网页是一组内容高度相似的网页的首选版本。<br
/> 如何指定规范网页？</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">要指定指向网页 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish 的规范链接，请按以下形式创建 &lt;link&gt; 元素：</span>
&nbsp;
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;canonical&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.example.com/product.php?item=swedish-fish&quot;</span><span style="color: #339933;">/&gt;</span>将上述链接复制到该网页所有非规范版本的 <span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span> 部分，如 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish&amp;sort=price。</span>
&nbsp;
如果您在 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish 和 https://www.example.com/product.php?item=swedish-fish 上都发布了内容，则可以指定该网页的规范版本。创建 &lt;link&gt; 元素： </span>
&nbsp;
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;canonical&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.example.com/product.php?item=swedish-fish&quot;</span><span style="color: #339933;">/&gt;</span>将上述链接添加到 https<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.comproduct.php?item=swedish-fish 的 &lt;head&gt; 部分。</span></pre></div></div><p>对于<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>用户来说，可以用下面的方法来消除重复元说明方法，header.php 中加以下代码：</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">将代码添加到&lt;head&gt;部分:
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;canonical&quot; href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>轻松搞定wordpess website seo</title><link>http://www.canfree.com/wordpess-website-seo.htm</link> <comments>http://www.canfree.com/wordpess-website-seo.htm#comments</comments> <pubDate>Wed, 06 Jan 2010 17:44:11 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[网站优化]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[优化]]></category> <category><![CDATA[技巧]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=116</guid> <description><![CDATA[用wordpress搭建博客真是多快好省，免费开源插件多主题多技术力量雄厚。有人说，wordpress的优化功能不行，所以才会冒出来数不清的SEO插件，其中最有名的就是all in one seo了，在之前的文章中已经说过，这些类型的插件就是个鸡肋，中看不中用，搞得wordpress必须要借助很多插件才能使用一样，悲哀，实在是悲哀。 左手烟@现在这个站一路坎坷，除了域名好记外，没什么值得称道的地方了。毕竟一个曾在别人手里遭到百度惩罚的域名，易主之后也未必能好到哪里。不过切记，国外的免费空间千万别用，否则一旦挂掉，百度立马停封，直到2009年12月30本站重新搭建，百度查询依然为零。 2010年1月5日，百度重新收录本站。 下面谈谈个人的一点看法，仅供参考： 不要安装所谓的SEO插件，不管是中文的还是英文的； 不要安装针对百度的sitemap插件，但一定要安装谷歌的sitemap插件； 一定要优化首页及内容页的title、description、keywords，请参考这篇文章 每篇文章的内链不超过5个，全部加nofollow属性，推荐用这个插件手动设置 优化代码，并在多浏览器中测试，推荐用这个工具本机调试 搭建一个独立的sitemap页面，推荐用这个插件 网址静态化，可用这个插件进行中翻英 每天至少一篇还说得过去的文章 多制造外部链接 与质量好的站交换链接 以上10条针对wordpress的黄金优化法则，除了最后3条需要时间积累，其余7条可以立马付诸行动。已经有朋友看到了效果，什么黑帽、白帽，什么作弊工具统统扔掉，2010年要一步一个脚印，踏踏实实才能虎虎生威！]]></description> <content:encoded><![CDATA[<p>用<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>搭建博客真是多快好省，免费开源插件多主题多技术力量雄厚。有人说，wordpress的<a
href="http://www.canfree.com/tag/%e4%bc%98%e5%8c%96"target="_blank"title="查看与[博客优化]有关的文章" >优化</a>功能不行，所以才会冒出来数不清的<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>插件，其中最有名的就是all in one seo了，在之前的文章中已经说过，这些类型的插件就是个鸡肋，中看不中用，搞得wordpress必须要借助很多插件才能使用一样，悲哀，实在是悲哀。</p><p>左手烟@现在这个站一路坎坷，除了域名好记外，没什么值得称道的地方了。毕竟一个曾在别人手里遭到百度惩罚的域名，易主之后也未必能好到哪里。不过切记，国外的免费空间千万别用，否则一旦挂掉，百度立马停封，直到2009年12月30本站重新搭建，百度查询依然为零。<span
id="more-116"></span></p><p>2010年1月5日，百度重新收录本站。</p><p
style="text-align: center;"><img
class="size-full wp-image-117 aligncenter" title="baidu-seo" src="http://www.canfree.com/wp-content/uploads/2010/01/baidu-seo.gif" alt="baidu seo 轻松搞定wordpess website seo" width="486" height="216" /></p><p>下面谈谈个人的一点看法，仅供参考：</p><ol><li>不要安装所谓的SEO插件，不管是中文的还是英文的；</li><li>不要安装针对百度的<a
href="http://fairyfish.net/2009/10/20/baidu-sitemap/">sitemap</a>插件，但一定要安装谷歌的<a
href="http://www.arnebrachhold.de/redir/sitemap-home/">sitemap</a>插件；</li><li>一定要优化首页及内容页的title、description、keywords，<a
href="http://www.canfree.com/wordpress-seo-optimization-also-pointed-out-bluntly-that-matter.htm">请参考这篇文章</a></li><li>每篇文章的内链不超过5个，全部加nofollow属性，推荐用<a
href="http://cvs.aesinformatica.com/download/automatic-seo-links">这个插件</a>手动设置</li><li>优化代码，并在多浏览器中测试，推荐用<a
href="http://www.my-debugbar.com/wiki/IETester/HomePage">这个工具</a>本机调试</li><li>搭建一个独立的sitemap页面，推荐用<a
href="http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/">这个插件</a></li><li>网址静态化，可用<a
href="http://blog.2i2j.com/">这个插件</a>进行中翻英</li><li>每天至少一篇还说得过去的<a
href="http://www.canfree.com/year-old-mans-status.htm">文章</a></li><li>多制造<a
href="http://www.chinamyhosting.com/seoblog/2006/06/30/get-incoming-links/">外部链接</a></li><li>与质量好的站<a
href="http://www.canfree.com/link">交换链接</a></li></ol><p>以上10条针对wordpress的黄金优化法则，除了最后3条需要时间积累，其余7条可以立马付诸行动。已经有朋友看到了效果，什么黑帽、白帽，什么作弊工具统统扔掉，2010年要一步一个脚印，踏踏实实才能虎虎生威！</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/wordpess-website-seo.htm/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>WordPress SEO 优化也就那点破事</title><link>http://www.canfree.com/wordpress-seo-optimization-also-pointed-out-bluntly-that-matter.htm</link> <comments>http://www.canfree.com/wordpress-seo-optimization-also-pointed-out-bluntly-that-matter.htm#comments</comments> <pubDate>Mon, 04 Jan 2010 15:16:53 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[优化]]></category> <guid
isPermaLink="false">http://www.canfree.com/wordpress-seo-optimization-also-pointed-out-bluntly-that-matter.htm</guid> <description><![CDATA[所有与WordPress优化相关的SEO插件对于左手烟@来说都是鸡肋，所实现的无非就是看似能提高排名获得流量实则效果不大而且还占用空间拖慢速度的垃圾功能。左手烟@从来都不用什么优化插件，因为Wordpress本身就可以实现，只是你不知道而已。 第一：优化标题，下面的代码可以实现首页为【网站标题 -  网站副标题】的形式，文章页为【文章标题 - 网站标题】的形式，这样有利于搜索引擎抓取。 &#60;title&#62;&#60;?php if(is_home()) {echo ""; bloginfo('name'); echo " - "; bloginfo('description');} else {wp_title(' -',true,'right'); echo ""; bloginfo('name'); echo "";} ?&#62;&#60;/title&#62; 下面这个是高级应用，自行体验： &#60;title&#62;&#60;?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?&#62;&#60;?php } if (is_archive()) { ?&#62;&#60;?php } elseif (is_search()) { ?&#62;&#60;?php echo $s; } if ( !(is_404()) and (is_search()) or (is_single()) or [...]]]></description> <content:encoded><![CDATA[<p>所有与<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >WordPress</a><a
href="http://www.canfree.com/tag/%e4%bc%98%e5%8c%96"target="_blank"title="查看与[博客优化]有关的文章" >优化</a>相关的<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>插件对于左手烟@来说都是鸡肋，所实现的无非就是看似能提高排名获得流量实则效果不大而且还占用空间拖慢速度的垃圾功能。左手烟@从来都不用什么优化插件，因为Wordpress本身就可以实现，只是你不知道而已。</p><p>第一：优化标题，下面的代码可以实现首页为【网站标题 -  网站副标题】的形式，文章页为【文章标题 - 网站标题】的形式，这样有利于搜索引擎抓取。<span
id="more-90"></span></p><table
border="0" cellspacing="0" cellpadding="2" width="500"><tbody><tr><td
width="500" valign="top">&lt;title&gt;&lt;?php if(is_home()) {echo ""; bloginfo('name'); echo " - "; bloginfo('description');} else {wp_title(' -',true,'right'); echo ""; bloginfo('name'); echo "";} ?&gt;&lt;/title&gt;</td></tr></tbody></table><table
border="0" cellspacing="0" cellpadding="2" width="500"><tbody><tr><td
width="500" valign="top">下面这个是高级应用，自行体验：<br
/> &lt;title&gt;&lt;?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?&gt;&lt;?php } if (is_archive()) { ?&gt;&lt;?php } elseif (is_search()) { ?&gt;&lt;?php echo $s; } if ( !(is_404()) and (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?&gt;&lt;?php _e(' | '); ?&gt;&lt;?php } ?&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;</td></tr></tbody></table><p><span
style="background-color: #ffffff;">第二：优化首页及文章页的【description】与【keywords】，实现的效果是为首页指定一个固定的keywords与description，而文章页的description表述是截取的部分内容，keywords则对应本篇文章的tags。</span></p><table
border="0" cellspacing="0" cellpadding="2" width="500"><tbody><tr><td
width="500" valign="top">&lt;?php<br
/> if (!function_exists('utf8Substr')) {<br
/> function utf8Substr($str, $from, $len)<br
/> {<br
/>      return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'.<br
/>           '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s',<br
/>           '$1',$str);<br
/> }<br
/> }<br
/> if (is_home()){<br
/>     $description = "这里是网站首页的描述";<br
/>     $keywords = "这里是网站首页的关键词，用英文,分隔";<br
/> } elseif (is_single()){<br
/>     if ($post-&gt;post_excerpt) {<br
/>         $description  = $post-&gt;post_excerpt;<br
/>     } else {<br
/>    if(preg_match('/&lt;p&gt;(.*)&lt;\/p&gt;/iU',trim(strip_tags($post-&gt;post_content,"&lt;p&gt;")),$result)){<br
/>     $post_content = $result['1'];<br
/>    } else {<br
/>     $post_content_r = explode("\n",trim(strip_tags($post-&gt;post_content)));<br
/>     $post_content = $post_content_r['0'];<br
/>    }<br
/>          $description = utf8Substr($post_content,0,220);  <br
/>   }<br
/>     $keywords = "";     <br
/>     $tags = wp_get_post_tags($post-&gt;ID);<br
/>     foreach ($tags as $tag ) {<br
/>         $keywords = $keywords . $tag-&gt;name . ",";<br
/>     }}<br
/> ?&gt;<br
/> &lt;meta name="description" content="&lt;?php echo trim($description); ?&gt;" /&gt;<br
/> &lt;meta name="keywords" content="&lt;?php echo rtrim($keywords,','); ?&gt;" /&gt;</td></tr></tbody></table><p>第三，这一步其实可有可无，如果你追求极致，那么可以继续优化CSS与JS，尽量缩小容量。因为网站加载速度也是搜索引擎今后考量的参数之一。</p><p>推荐一款插件：<a
href="http://www.svachon.com/wp-html-compression/" target="_blank"><strong>WP-HTML-Compression</strong></a>，清除源代码里多余的空格、注释等等，安全无毒，放心使用。</p><p>推荐一款压缩JS的工具：<a
href="http://www.canfree.com/with-the-microsoft-ajax-minifier-highly-efficient-compression-technology-js-file.htm">用Microsoft Ajax Minifier技术高效率压缩Js文件</a>。</p><p>CSS不建议压缩，不方便修改，也压不了多少。</p><p>背景图片多的话，可以做成一张图，用CSS控制，也不建议，太麻烦。</p><p>一个<a
href="http://tools.pingdom.com/" target="_blank">网站测试工具</a>，看看你的页面加载时间。对于一个博客来说，8秒左右是正常的。</p><table
border="0" cellspacing="0" cellpadding="2" width="500"><tbody><tr><td
width="500" valign="top">在未来Google 考虑将网页加载速度作为衡量PR值的参数之一，并发布了 Page Speed 工具，供用户分析和优化网站内容，并提供网站加载速度优化建议。<br
/> Google Page Speed 官方网址：<a
href="http://code.google.com/speed/page-speed/index.html">http://code.google.com/speed/page-speed/index.html</a></td></tr></tbody></table> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/wordpress-seo-optimization-also-pointed-out-bluntly-that-matter.htm/feed</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>手动优化wordpress数据库</title><link>http://www.canfree.com/manual-optimization-wordpress-database.htm</link> <comments>http://www.canfree.com/manual-optimization-wordpress-database.htm#comments</comments> <pubDate>Sun, 03 Jan 2010 14:40:02 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[优化]]></category> <category><![CDATA[数据库]]></category> <guid
isPermaLink="false">http://www.canfree.com/manual-optimization-wordpress-database.htm</guid> <description><![CDATA[WordPress使用时间长了，数据库中的冗余数据就会很多，定期优化和清理Wordpress的数据库，可以保证Wordpress能够快速工作，并能减轻服务器负担。 首先，停用一些无用的插件，进入phpMyadmin，将WordPress系统表之外的数据表都删除，只保留wp_posts， wp_comments， wp_terms， wp_term_relationships， wp_term_taxonomy 等系统数据表。 其次，通过SQL语句进行冗余数据删除操作。删除前记得先导出备份一下。 删除脚本命令如下，一次只能操作一条命令： DELETE FROM wp_posts WHERE post_type = ‘revision’; DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_lock’; DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_last’; 最后，在phpMyAdmin中，选中所有表，再选择“优化表”。 经过这三步操作，就可以将WordPress数据库中的冗余数据删除，优化了数据库的性能，网站也快了许多。]]></description> <content:encoded><![CDATA[<p><a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >WordPress</a>使用时间长了，数据库中的冗余数据就会很多，定期<a
href="http://www.canfree.com/tag/%e4%bc%98%e5%8c%96"target="_blank"title="查看与[博客优化]有关的文章" >优化</a>和清理Wordpress的数据库，可以保证Wordpress能够快速工作，并能减轻服务器负担。</p><p>首先，停用一些无用的<b>插件</b>，进入phpMyadmin，将WordPress系统表之外的数据表都删除，只保留wp_posts， wp_comments， wp_terms， wp_term_relationships， wp_term_taxonomy 等系统数据表。</p><p>其次，通过SQL语句进行冗余数据删除操作。删除前记得先导出备份一下。</p><p>删除脚本命令如下，一次只能操作一条命令：</p><p> DELETE FROM wp_posts WHERE post_type = ‘revision’;</p><p> DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_lock’;</p><p> DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_last’;</p><p>最后，在phpMyAdmin中，选中所有表，再选择“优化表”。</p><p>经过这三步操作，就可以将WordPress数据库中的冗余数据删除，优化了数据库的性能，网站也快了许多。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/manual-optimization-wordpress-database.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
