用谷歌变速箱(Google Gears)加快 Joomla! 1.5 后台的操作速度
这篇文章是对 Phil Taylor 撰写的博客文章 Turbo Charge Your Joomla 1.5.x Admin Console 的翻译和补充,此方法已经在 Joomla! 1.5.7 上通过测试(
),请放心使用。
Joomla! 1.5.x 的管理后台采用 Mootools 和大量其它 JavaScript 来实现滑动菜单等动态效果。如果用户还安装了许多第三方扩展(这几乎是必须的),以及某个 WYSIWYG 编辑器,你就会发现后台操作速度下降很多。
Blue Flame IT (Jersey) Ltd.(Phil Taylor 的公司)最近开发了一款 Joomla! 1.5.x 标准插件,此插件借用谷歌变速箱(Google Gears)的功能,可以大幅度提高 J1.5 后台的操作速度。
![]()
首先有必要介绍一下 Google Gears 的有关情况。
-
什么是 Google Gears?
Gears 原本是一个开源项目,它是一个浏览器插件程序,功能主要是增强网站服务器端 Web 程序与访客浏览器端的交互性,例如:借助 Gears,浏览器可以在 PC 端储存网站的某些数据,从而加快访问速度;或者网站管理员可以针对不同的地理位置编写不同的内容,则不同地区的访客就看到了各自的那部分内容。
Gears 起先是用来优化 Google 网站的访问速度的,现在它也能用于其它任何网站。很多 Web 程序已经开始使用 Gears,例如 Google Reader 和 Google Docs。还有针对手机浏览器的 Picasa 在线相册 也使用了 Gears。大家熟悉的 Blog 程序 WordPress 也有一款插件使用 Google Gears 来加速。本文介绍的这个 Joomla! 1.5 Google Gears 插件就是从 WordPress 的插件改造来的。
Google Gears 的工作需要 Web 程序和浏览器都安装相应插件。当你用安装了 Gears 的浏览器访问安装了 Gears 的网站时,浏览器会提示“The website below wants to use Gears”,如果你信任该网站,就勾选“I trust this site. Allow it to use Gears”,然后点击“Allow” 按钮;如果想阻止某个网站使用 Gears,就勾选“Never allow this site”。以后再访问该网站就不再询问。浏览器上的 Gears 就会自动将该网站上某些数据储存在你的个人电脑上。如果要管理对网站的 Gears 许可,可以在浏览器上进行设置。FireFox 和 IE 浏览器的设置位置在“工具 -> Google Gears Settings”。
-
Google Gears 把数据存在什么地方?
根据 PC 端操作系统及浏览器不同,Google Gears 存放本地数据的位置也不同。以下是常用操作系统及浏览器的有关位置:
Windows Vista
- Internet Explorer: C:\Users\<user>\AppData\LocalLow\Google\Google Gears for Internet Explorer
- Firefox: Database files are stored in the user profile directory. C:\Users\<user>\AppData\Local\Mozilla\Firefox\Profiles\{PROFILE}.default\Google Gears for Firefox
- Google Chrome: Database files are stored in the user profile directory. C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\Plugin Data\Google Gears
Windows XP
- Internet Explorer: C:\Documents and Settings\<user>\Local Settings\Application Data\Google\Google Gears for Internet Explorer
- Firefox: Database files are stored in the user profile directory. C:\Documents and Settings\<user>\Local Settings\Application Data\Mozilla\Firefox\Profiles\{PROFILE}.default\Google Gears for Firefox
- Google Chrome: Database files are stored in the user profile directory. C:\Documents and Settings\<user>\Local Settings\Application Data\Google\Chrome\User Data\Default\Plugin Data\Google Gears
Mac OS X
- Firefox: Database files are stored in the user profile directory. Users/<user>/Library/Caches/Firefox/Profiles/{PROFILE}.default/Google Gears for Firefox
- Safari: ~/Library/Application Support/Google/Google Gears for Safari
Linux Firefox: Database files are stored in the user home directory. <user>/.mozilla/firefox/{PROFILE}.default/Google Gears for Firefox
Microsoft Windows Mobile Internet Explorer: Database files are stored in the Application Data directory. \Application Data\Google\Google Gears for Internet Explorer
另外,Google Gears 针对不同电脑和不同浏览器储存的数据进度也不同。如果你更换了电脑,或者更换了浏览器,就必须重新同步数据。
-
安装 Google Gears 的系统要求
下列环境的任意一种都可以安装 Gears:
- Microsoft Windows XP or Vista with Firefox 1.5+ or Internet Explorer 6+
- Apple Mac OS X 10.4+ with Firefox 1.5+
- Apple Mac OS X 10.4.11 (or higher) or 10.5.3 (or higher) with Safari 3.1.1
- Linux with Firefox 1.5+
- Microsoft Windows Mobile 5 or higher, with Internet Explorer 4.01+
目前 Gears 不支持下列设备:
- Samsung i320 and i320N
- Orange SPV C600
- Motorola Q
-
Google Gears 的安装
安装 Google Gears 的过程很简单:以管理员身份登录你的个人电脑(一般人都是开机默认管理员用户登录吧),然后访问 Google Gears 官方网站,点击主页右侧的“下载”按钮,就会弹出小窗口自动下载安装包,下载完成后开始安装。安装完成后会询问你是否要重新启动浏览器。必须重新启动浏览器才能使 Gears 生效。
注意:如果同一个浏览器开启了多个窗口,必须关闭所有窗口才算完全关闭,然后重新启动。有些电脑上会出现窗口已关闭,但是浏览器进程还未关闭的情况。这时候可以通过同时按下 Ctrl + Alt + Del 进入任务管理器,将残留的浏览器进程关闭。
怎么才能确认已经安装成功?很简单:重新启动浏览器后再次访问 http://gears.google.com 网站,该页面就会告诉你是否已经安装成功。
上图就是成功安装 Gears 之后再访问 Google Gears 官方网站时的画面,右侧原来显示“Install Now” 的地方现在显示的是“Gears is installed”,并且显示了版本号及你正在使用的操作系统平台和浏览器类型。
不论你是通过哪个浏览器安装的,安装之后,同一个电脑上的所有浏览器都会看到同样的 Google Gears 安装成功消息。
如果将来想卸载,操作方法跟卸载其它软件一样。Windows XP 用户就直接从控制面板上的“添加/删除程序”里面卸载即可。
在初次使用 Google Gears 时可能会发现访问某些网站反而速度变慢了,这是因为远程数据还未同步到本地。一旦数据同步完成,再访问时就快多了。
-
在 Joomla! 1.5 上安装 Google Gears 插件
注意:这款插件只支持 php 5.0 以上版本。
- 首先下载 Google Gears Support 插件 for Joomla! 1.5;
- 通过 Joomla 1.5.x 后台安装此插件(与其它 J15 插件一样);
- 点击顶部菜单的“扩展套件 -> 插件管理”,找到“System – System – Google Gears Support”插件并打开;
- 发布(启用)此插件,点击“保存”,然后等待大约 5 秒钟就会看到顶部“预览”链接旁边出现一个新的链接:“Update Gears”;
- 点击这个 Update Gears 链接,根据提示操作 (如果你的 PC 上还没有安装 Google Gears,就会提示你安装);
点击工具栏上的 Update Gears 链接之后,首先弹出下面的窗口。本站测试时已经预先安装了 Gears,因此这里也显示 Gears is installed on this computer 。不过,还没有激活。点击这个弹出窗口左下角的“Enable Gears”按钮,就会再次弹出一个小窗口,询问是否启用 Gears:
勾选“安全警告”弹出窗口上的“我信任该网站”,然后点击“允许”按钮,就完成了 Google Gears 的启用。
- 在接下来很短时间内,大约 900 多个文件都会针对 gears 进行更新。然后你再操作 Joomla! 1.5 后台,你会发现快多了!



共有 4 条评论
说的是捏
謝謝提供這麼好的資源。先回復再回去裝來試試了
52提供Google Gears Support 下载地址
http://gears.google.com/这就是下载地址
发表评论