<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Kuberski - 酷伯司机</title><subtitle type="text">写在代码边上</subtitle><id>http://feed.cnblogs.com/blog/u/36965/rss</id><updated>2011-01-14T03:02:03Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/36965/rss"/><entry><id>http://www.cnblogs.com/kuber/archive/2011/01/14/install_webos_sdk_on_ubuntu.html</id><title type="text">在Ubuntu 上安装webOS SDK</title><summary type="text">今天花了几个小时在Ubuntu 上装好了webOS 开发环境。 安装的过程中碰到几个不大不小的问题， 花了点时间google 了一下，记录在这里</summary><published>2011-01-14T03:01:00Z</published><updated>2011-01-14T03:01:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2011/01/14/install_webos_sdk_on_ubuntu.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2011/01/14/install_webos_sdk_on_ubuntu.html"/><content type="html">&lt;p&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;今天花了几个小时在Ubuntu 上装好了webOS 开发环境， 准备学一下Palm 手机开发， 开发个小程序， 也算为公司做点贡献&amp;nbsp;&lt;/span&gt;&lt;img src="http://www.cnblogs.com/Emoticons/msn/tongue_smile.gif" alt="" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;Palm 的开发中心地址是 &lt;/span&gt;&lt;a href="http://developer.palm.com/index.php"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;developer.palm.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;， 里面可以找到&lt;/span&gt;&lt;a href="http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;layout=page&amp;amp;id=1788"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;layout=page&amp;amp;id=1788"&gt;&lt;/a&gt;&lt;a href="http://developer.palm.com/index.php?option=com_content&amp;amp;view=article&amp;amp;layout=page&amp;amp;id=1788"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;SDK 安装&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;说明&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;， MacOS， Windows 和 Ubuntu 平台都有。 Ubuntu 的安装说明在&lt;/span&gt;&lt;a href="http://developer.palm.com/index.php"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;这里&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;， 基本上照着顺序一步一步来， 不过安装的过程中我这个Ubuntu 新手还是碰到几个不大不小的问题， 花了点时间google 了一下，记录在这里。&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;1. &amp;nbsp;webOS 的开发环境用VirtualBox 做模拟器， 所以需要先安装VirutalBox 3.2 以上。 文档里面给出的VirtualBox&amp;nbsp;&lt;/span&gt;&lt;span  style="line-height: normal; font-size: 12pt; font-family: Verdana; "&gt;repository&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;点过时了，&lt;/span&gt;&lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;VirtualBox 的网站&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;说明了已经从&lt;/span&gt;&lt;span  style="font-family: Verdana, 'Bitstream Vera Sans', sans-serif; line-height: normal; font-size: 13px; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span  style="line-height: normal; font-size: 12pt; font-family: Verdana; "&gt;&lt;em&gt;non-free改到了&lt;/em&gt;&amp;nbsp;&lt;em&gt;contrib， 我用的是这个:&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;span  style="line-height: normal; white-space: pre; font-size: 12pt; font-family: Verdana; "&gt;deb http://download.virtualbox.org/virtualbox/debian maverick contrib&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;我是Ubuntu 10.10， 你可以在&lt;/span&gt;&lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;VirtualBox 的网站&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;上找到对应你的版本的源&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Verdana; font-size: 16px; "&gt;2. Ubuntu 9(?) 以后的版本去掉了Sun 的jre， 你需要从别的源安装。 打开/etc/apt/source.list, 找到类似以下两句， 'XXXXX' 是你Ubuntu 版本的代号：&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Arial, sans-serif; line-height: 22px; font-size: 13px; color: #333333; "&gt;&lt;em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; display: inline !important; "&gt;&lt;em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 12pt; font-family: Verdana; "&gt;#deb http://archive.canonical.com/ubuntu XXXXX partner&amp;nbsp;&lt;br /&gt;&lt;/em&gt;&lt;/pre&gt;&#xD;
&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; display: inline !important; "&gt;&lt;em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 12pt; font-family: Verdana; "&gt;#deb-src http://archive.canonical.com/ubuntu XXXXX partner&lt;/em&gt;&lt;/pre&gt;&#xD;
&amp;nbsp;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Verdana; font-size: 16px; "&gt;取消注释保存文件，就可以按照文档安装sun jre6 了。&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span style="font-size: 12pt; font-family: Verdana; "&gt;如果你要在浏览器中使用Ares &amp;nbsp;IDE， 记得安装jre 插件：&amp;nbsp;&lt;/span&gt;&lt;span  style="font-family: Arial, sans-serif; line-height: 22px; font-size: 13px; color: #333333; "&gt;&lt;em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; display: inline !important; "&gt;&lt;em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-family: Verdana; font-size: 12pt; "&gt;sudo apt-get install &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 12pt; "&gt;sun-java6-plugin&lt;/span&gt;&lt;/em&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Arial, sans-serif; line-height: 22px; font-size: 13px; color: #333333; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; display: inline !important; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 12pt; font-family: Verdana; "&gt;3.安装Palm Novacom 要根据你的linux 分别下载32位或者64 位版本.&lt;/span&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Verdana; font-size: 16px; white-space: pre; "&gt;判断linux kernel: uname -m&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;br /&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&lt;span  style="font-family: Arial, sans-serif; line-height: 22px; font-size: 13px; color: #333333; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; display: inline !important; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 12pt; font-family: Verdana; "&gt;4. SDK 安装包有188M， 建议先开始下载安装包， 乘下载的时候做别的步骤。&lt;/span&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/kuber/aggbug/1935290.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/kuber/archive/2011/01/14/install_webos_sdk_on_ubuntu.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/04/08/Why_Userscripts_Is_Not_Better_Than_Extensions.html</id><title type="text">用户脚本比扩展更省内存吗</title><summary type="text">谷奥和chrome迷最近都转载了一篇ghacks的文章"为什么说 Chrome 能用脚本就尽量不要用扩展"，因为用户脚本比扩展更省内存，所以建议用户尽量用user script。因为我自己装了很多扩展，而且开发了几个扩展，以前关注过这个问题，想借此机会说明一下我的看法：扩展未必比脚本消耗更多资源，如果扩展开发者适当地使用Chrome 扩展API的话.要说明这个问题,首先要看看一个Chrome 扩展...</summary><published>2010-04-08T03:36:00Z</published><updated>2010-04-08T03:36:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/04/08/Why_Userscripts_Is_Not_Better_Than_Extensions.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/04/08/Why_Userscripts_Is_Not_Better_Than_Extensions.html"/><content type="html">&lt;div&gt;&lt;span  style="font-size: 14.1667px; "&gt;&lt;a href="http://www.google.org.cn/posts/why-you-should-use-userscripts-and-not-extensions-when-possible.html" target="_blank"&gt;谷奥&lt;/a&gt;和&lt;a href="http://www.chromi.org/archives/4047" target="_blank"&gt;chrome迷&lt;/a&gt;最近都转载了一篇ghacks的文章"&lt;a href="http://www.ghacks.net/2010/04/04/why-you-should-use-userscripts-and-not-extensions-when-possible/" target="_blank"&gt;为什么说 Chrome 能用脚本就尽量不要用扩展&lt;/a&gt;"，因为用户脚本比扩展更省内存，所以建议用户尽量用user script。因为我自己装了很多扩展，而且开发了几个扩展，以前关注过这个问题，想借此机会说明一下我的看法：扩展未必比脚本消耗更多资源，如果扩展开发者适当地使用Chrome 扩展API的话.&lt;/span&gt;&lt;/div&gt;&#xD;
&lt;div&gt;&lt;br /&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;div&gt;要说明这个问题,首先要看看一个Chrome 扩展包括了哪几个部分:&lt;/div&gt;&#xD;
&lt;div&gt;&lt;strong&gt;popup page(弹出页面)&lt;/strong&gt;: 当你点击地址栏边上的图标时弹出的页面. 这个页面只在你点击时创建, 当鼠标移开页面关闭时就会被销毁掉. 因此在你不使用这个页面时不会消耗资源. 很多信息查看的插件就只使用了popup page, 如&lt;a href="https://chrome.google.com/extensions/detail/cmgggdjomoaabklflchgiimipgojabgj" target="_blank"&gt;China Stock Chart&lt;/a&gt;;&lt;/div&gt;&#xD;
&lt;div&gt;&lt;strong&gt;content scripts(页面脚本)&lt;/strong&gt;: Chrome 会把一段javascript 脚本注入到符合要求(由开发者指定)的页面中, 好像页面本来就引用了这段脚本一样, 并在Chrome 加载完页面后自动运行这段脚本. 很多修改页面布局和使用快捷键的扩展都使用了这种方式. 在Chrome 中使用user script 其实就是由Chrome 自动把脚本包装成一个只有content scripts的扩展, 这也是Chrome 不需要装插件就能使用user script的原因.&lt;/div&gt;&#xD;
&lt;div&gt;&lt;strong&gt;background page (背景页面)&lt;/strong&gt;: 所谓背景页面就是在后台自动运行的一段程序, 虽然也是用html+javascript 写的, 但是用户是看不到的. 当Chrome 启动时会启动所有扩展的背景页面, 并且这些背景页面会一直呆在Chrome 里面直到关闭浏览器. 因为它是一直在运行的, 扩展可以定期执行一些工作, 比如说定期检查你的gamil 邮件. 还有就是出于安全考虑, 在Chrome中页面脚本和弹出页面不能直接交换数据, 扩展也不能直接和其它扩展交换数据, 必须通过background page来交流.&lt;/div&gt;&#xD;
&lt;div&gt;&lt;img src="http://images.cnblogs.com/cnblogs_com/kuber/chrome-extension.jpg" border="1" alt="" /&gt;&lt;br /&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;从上面的介绍可以看出, 消耗的资源从上到下越来越多. 只要你不点击图标, popup page 不会使用资源, content scripts 只存在特定的页面中, 并且只是响应页面上的事件. 而且content scripts其实就是user script, 因此消耗的资源和user script是一样的. background page 则是最大的资源消耗者. 其实在Task Manager 中能看到的扩展都是因为它们使用了background page, 以实现user script 所做不到的事情. 所以我的结论是"理论上"使用实现相同功能的user script 不会比扩展节省资源.&lt;/p&gt;&#xD;
&lt;div&gt;&lt;img src="http://images.cnblogs.com/cnblogs_com/kuber/google_chrome_task_manager.jpg" border="0" alt="" width="481" height="244" /&gt;&lt;br /&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div&gt;但是, 这个世界坏就坏在有但是 :-), 在实际我们使用的扩展中有不少其实不需要使用background page 却用了. 比如说一些划词翻译的扩展, 主要是响应用户在页面上鼠标选词事件, 其实并不需要background page. 我看过其代码, 它在background page中其实什么都没有做, 但是却加了一个background page常驻在浏览器的内存里面. 装多了类似的扩展自然你的chrome 消耗的资源就多了, 对于这种扩展显然 user script 或者bookmarklet 更合适.&amp;nbsp;&lt;/div&gt;&#xD;
&lt;div&gt;&lt;br /&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;---------------------------------------------------------------------------------&amp;nbsp;&lt;/p&gt;&#xD;
&lt;div&gt;Moreover, 我曾经想过为什么很多扩展不需要background page却吃力不讨好地加了一个放在扩展里面. 我的猜想是, google 以前给出的chrome扩展开发教程里面的Get Started 示例包含了 background page, 可能有些开发者把那个示例当作新扩展的模板, 但是忘记在适当是时候去掉了.&amp;nbsp;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/kuber/aggbug/1707135.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/kuber/archive/2010/04/08/Why_Userscripts_Is_Not_Better_Than_Extensions.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/04/08/shanghai_pudong_driving_license.html</id><title type="text">上海浦东驾照换证攻略</title><summary type="text">LD大人的驾驶证快到期了，礼拜六配她去了趟沪南公路车管所把驾驶证换了。之前在网上查到不少文章都是介绍到交警队代办或者到闵行区沁春路179号办理的, 没有找到浦东的,  所以把我了解到的情况和大家分享一下。 </summary><published>2010-04-08T02:35:00Z</published><updated>2010-04-08T02:35:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/04/08/shanghai_pudong_driving_license.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/04/08/shanghai_pudong_driving_license.html"/><content type="html">&lt;span  style="font-family: 宋体, Verdana, Arial, Helvetica, sans-serif; line-height: 21px; font-size: 11.6667px; "&gt;LD大人的驾驶证快到期了，礼拜六配她去了趟沪南公路车管所把驾驶证换了。之前在网上查到不少文章都是介绍到交警队代办或者到&lt;span  style="font-family: tahoma, 宋体, fantasy; line-height: 22px; font-size: 11.6667px; "&gt;闵行区沁春路179号办理的, 没有找到浦东的, &amp;nbsp;所以&lt;/span&gt;把我了解到的情况和大家分享一下。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;首先你不是一定要到沪南公路去换证。如果你的驾驶证是上海的（好像是废话）而且住的地方离户口所在地的交警支队不远的话，可以直接去交警支队交给他们&lt;strong&gt;代办&lt;/strong&gt;。体检表去医院搞、照片去现场拍，身份证带好，有复印件自己带一个，15个工作日拿证。浦东户口的可以到杨高中路1500号，咨询电话：22046593&amp;nbsp;&lt;br /&gt;&lt;br /&gt;如果去户口所在地的交警支队比较麻烦，比如说户口在浦西住在浦东，可以考虑去沪南公路车管所自己办，不管户口在哪个区都可以在这里办，当天可以拿到新驾驶证；地址是沪南公路2638号，电话58123456，不过我从来没有打通过。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;工作时间是礼拜一到礼拜六9点~17点，中午12点到1点休息。带好资料（身份证，身份证复印件，驾驶证，&lt;strong&gt;&lt;u&gt;到期换证的不需要底卡&lt;/u&gt;&lt;/strong&gt;）和钱就够了。走外环沪南公路出口下，沿沪南公路向南开，第一个路口右转弯开进去几百米就到了。出口处和沿路有指示牌，跟着走就行。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;换证在一号楼，进车管所大门开到底再往左。如果你没有事先体检过没有带照片的话，先去四号楼拍照和体检，就是一号楼再下去一点。门口有停车场，免费停车。我们先到三楼凭身份证交钱拍照（30块），等几分钟拿到照片，同时给我一张打印好个人信息驾照申请表。再跑到二楼凭驾照和身份证交钱体检（60块）。在体检表格上需要贴刚才拿到的照片。体检后拿着照片体检表和申请表再去一号楼。如果你没有带身份证复印件的话，这时候可以在四号楼复印。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;到一号楼办证大厅拿个号等着，同时把身份证复印件剪出身份证大小的尺寸贴到申请表。叫到你后把资料都交上去。然后再等另外一个窗口叫你的名字，给你一张缴款单，跑到办证大厅的后面去交钱（5块钱手续费+10块工本费）。回来后再等叫你的名字，就可以拿到新驾驶证了。&amp;nbsp;&lt;br /&gt;&lt;br /&gt;花费总计105大洋，从到达车管所到拿到驾照前后连体检拍照55分钟。 我们清明节前的礼拜六去的，人不多，据说工作日人比较多，时间可能会长些。&lt;/span&gt;&lt;img src="http://www.cnblogs.com/kuber/aggbug/1707040.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/kuber/archive/2010/04/08/shanghai_pudong_driving_license.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/01/29/chrome_extension_china_stock_0_9_5.html</id><title type="text">China Stock 插件升级到0.9.5</title><summary type="text">网友给我留言说ChinaStock插件自选股不能添加深交所股票。 检查了代码发现问题在输入校验时只接受'000'打头的深交所股票，导致'001'和'002'开始的股票无法添加。之前由于我的疏忽仅仅简单地测试了几个000开始的股票就提交了。在0.9.5版中改正了这个bug。之前安装了插件的朋友会自动更新。 谢谢这位给我留言的朋友。</summary><published>2010-01-29T08:39:00Z</published><updated>2010-01-29T08:39:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/01/29/chrome_extension_china_stock_0_9_5.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/01/29/chrome_extension_china_stock_0_9_5.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/01/25/read_feed_with_google_apis.html</id><title type="text">google提供的几种读取feed的API</title><summary type="text">使用google 提供的API访问feed除了可以访问到历史条目外，还让google 处理各式各样的feed格式（Atom 1.0,Atom 0.3,RSS 2.0,RSS 1.0,RSS 0.94,RSS 0.93,RSS 0.92,RSS 0.91,RSS 0.9），统一返回一种格式（ATOM或JSON），为开发中在程序中解析feed提供便捷。本文总结我在开发FeedzShare 的过程中找到的的几种读取feed的Google API.</summary><published>2010-01-25T06:11:00Z</published><updated>2010-01-25T06:11:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/01/25/read_feed_with_google_apis.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/01/25/read_feed_with_google_apis.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/01/20/2010_read_one_book_per_week.html</id><title type="text">新的一年少上网，多读书</title><summary type="text">回过头看2009年，我的阅读越来越依赖网络。大部分的阅读是在Google Reader 和Twitter中完成。网络阅读胜在信息量大，时效性强，但是网上新闻多，评论多，感觉能沉淀下来的却少。新的一年要减少上网时间，多读些书。回到家不上Google Reader和Twitter，每天至少读书一个小时，计划每个礼拜读一本书。上个礼拜作了个统计，一般一本300页左右的中文书（非技术类）我6个小时能看完，...</summary><published>2010-01-20T09:25:00Z</published><updated>2010-01-20T09:25:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/01/20/2010_read_one_book_per_week.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/01/20/2010_read_one_book_per_week.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/01/15/chrome_extension_china_stock_0_9_4.html</id><title type="text">ChinaStock插件升级</title><summary type="text">Chrome 插件ChinaStock升级到0.9.4。在这一版本中加入了删除自选股的功能，同时修正了一个数据初始化的bug。已经安装了插件的用户不需要作什么，Chrome会自动升级。有图有真相：</summary><published>2010-01-15T04:51:00Z</published><updated>2010-01-15T04:51:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/01/15/chrome_extension_china_stock_0_9_4.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/01/15/chrome_extension_china_stock_0_9_4.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2010/01/12/1645820.html</id><title type="text">Chrome 插件：中国A股实时行情</title><summary type="text">最近迷上了Chrome Extension开发。乘元旦休息，在家里鼓捣出这么一个显示A股实时行情的插件</summary><published>2010-01-12T11:15:00Z</published><updated>2010-01-12T11:15:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2010/01/12/1645820.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2010/01/12/1645820.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2009/12/30/1636181.html</id><title type="text">Google Reader Shared Items页面上的XFN</title><summary type="text">最近在看microformat. 跑去Google Reader Shared Items 页面查源代码想看google怎么做的。页面上有指向Google Profile的连接。有趣的是连接是放在&amp;lt;head&amp;gt;里面的link:&amp;lt;link rel="me" href="http://www.google.com/profiles/113557210616935738114"&amp;gt;虽...</summary><published>2009-12-30T09:01:00Z</published><updated>2009-12-30T09:01:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2009/12/30/1636181.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2009/12/30/1636181.html"/></entry><entry><id>http://www.cnblogs.com/kuber/archive/2009/11/13/1602628.html</id><title type="text">user script: RSS Tool for Chrome</title><summary type="text">虽然Google 去年底就宣布要为Chrome 加上RSS支持, 到目前为止(4.0.237.0) Chrome 还是没有一丁点RSS 功能. 之前一直用这两个bookmarklet, 分别用来检测页面上的RSS 和预览/订阅RSS.继昨天的视频下载脚本后, 今天又写了一个RSS Tool for Chrome. 主要功能包括:自动检测页面中的RSS链接, 在右上角显示一个半透明的RSS 图标, ...</summary><published>2009-11-13T08:55:00Z</published><updated>2009-11-13T08:55:00Z</updated><author><name>kuber</name><uri>http://www.cnblogs.com/kuber/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kuber/archive/2009/11/13/1602628.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kuber/archive/2009/11/13/1602628.html"/></entry></feed>
