Gears,原稱Google Gears,是一款Google开发的軟體,讓使用者可以离线浏览。這套軟體透過以浏览器扩展的方式添加JavaScript API使得浏览器的脚本能够访问本地的SQLite缓存数据库。所以網頁是透過暫存區取得的,而不是從實際的網路上取得。而且,Web相關的程式可以週期性的透过Gears将本地暫存的資料與网络上的資料做同步。如果網路暫時無法使用,這個同步過程將會延後,直到網路恢復為止。因此,Gears的Web相關应用并不是即時的。

Gears
開發者Google
首次发布2009年5月28日
当前版本
  • 0.5.36.0 (2010年2月22日;穩定版本)[1]
編輯維基數據鏈接
操作系统Windows 2000, XP & Vista, Windows Mobile 5, Windows Mobile 6Mac OS X, Linux
许可协议BSD
网站http://gears.google.com/

由于HTML5能做到的同样的事情,Google已经放弃為Gears增加新功能[2]。並且於2011年底前撤出Google產品線而不再發行[3]

组件 编辑

Google Gears有几个主要的API组件:

  • 一个本地服务器,用来存储和读取离线程序资源(包括HTML, JavaScript, images等)。[4]
  • 一个小型数据库(以SQLite构建),用来储存本地数据。[5]
  • 一个工作池,用来让开发者将本地数据与服务器端后台同步。[6]
  • 一个桌面模型可使网络程序的操作贴近桌面程序,支持建立快捷方式鼠标拖放文件。[7]
  • 一个地理定位模型,能够让网络程序侦测到目前用户的地理位置。[8]

版本历史 编辑

版本 发布日期 描述
0.1 2007年5月31日 最初版本。
0.2 2008年2月22日[9]
- 2008年5月28日 开源,项目名称改为Gears。
0.3 2008年6月11日[10] 增加添加桌面图标的功能,支援Firefox 3
0.4 2008年8月22日[11] 地理定位API / Event handling for upload / download transfer progress, 40种语言的本地化
0.5 2008年11月24日[12] 升级了SQLite数据库,能够从WiFi信号获得地理定位, Improved API to manage data blobs on LocalServer

支援 编辑

有相当数量的网络程序使用了Gears,这些程序来自于许多公司,包括GoogleGoogle日历Google文件GMailPicasa网络相册Google阅读器YouTube)、MySpace(邮件搜索)、Zoho(Mail、Writer)、Remember The Milk、以及Buxfer[13]QQ空间[14][15]

WordPress支援Gears,以用来加速管理界面操作速度,减轻服务器点击负担。[16]

通过使用一个Google Gears工程师编写的Greasemonkey脚本,可以离线浏览英语维基百科[17]

Gears能够在Windows XP或以上的IE 6或以上,Windows MobileIE 4.01或以上,带觸控式螢幕Windows Mobile 6或以上的Opera Mobile 9.51或以上,Mac OS X 10.4.11以上或Mac OS X 10.5.3以上的Safari 3.1.1或以上,Google ChromeAndroid以及任何平台的Mozilla Firefox 1.5或以上版本浏览器使用。[18][19].

2008年5月29日,Opera ASA宣布新版本的OperaOpera Mobile 9.5将能支援Gears,这种支援不依赖于Google提供的软件,因而也不与之完全兼容。[20]

Gears on Rails框架支持Gears接口,提供一种Ruby形式的Google Gears API。[21]

参见 编辑

参考资料 编辑

  1. ^ https://code.google.com/p/gears/source/detail?r=3423.
  2. ^ 存档副本. [2010-06-27]. (原始内容存档于2010-06-03).  Google:你好 HTML5,再见 Gears
  3. ^ Template:Site news
  4. ^ LocalServer Module API. [2007-05-31]. (原始内容存档于2012-02-20). 
  5. ^ Database Module API. [2007-05-31]. (原始内容存档于2012-03-19). 
  6. ^ WorkerPool Module API. [2007-05-31]. (原始内容存档于2012-01-20). 
  7. ^ Desktop Module API. [2007-05-31]. (原始内容存档于2012-03-02). 
  8. ^ Geolocation Module API. [2008-08-27]. (原始内容存档于2012-03-11). 
  9. ^ 存档副本. [2008-08-28]. (原始内容存档于2008-02-28). 
  10. ^ 存档副本. [2008-08-28]. (原始内容存档于2008-06-13). 
  11. ^ 存档副本. [2008-08-28]. (原始内容存档于2008-08-23). 
  12. ^ 存档副本. [2009-03-04]. (原始内容存档于2007-12-10). 
  13. ^ Gears History. [2009-03-21]. (原始内容存档于2015-09-29). 
  14. ^ http://imgcache.qq.com/qzone/test/gears/gearsMng.html页面存档备份,存于互联网档案馆) QQ空间加速
  15. ^ http://www.cnbeta.com/articles/89655.htm页面存档备份,存于互联网档案馆) QQ空间开始使用Google Gears加速
  16. ^ WordPress Trac ticket - Gears Support. [2008-08-28]. (原始内容存档于2008-12-16). 
  17. ^ http://code.google.com/apis/gears/articles/gearsmonkey.html页面存档备份,存于互联网档案馆) Don't wait for your favorite website to enable offline support -- do it yourself.
  18. ^ Gears for Safari beta. Google. [2009-03-21]. (原始内容存档于2012-11-10). 
  19. ^ What browsers and operating systems are supported by Google Gears?. Google. [2009-03-21]. (原始内容存档于2008-12-06). 
  20. ^ Opera extends Gears support. Opera Software. [2009-03-21]. (原始内容存档于2008-10-11). 
  21. ^ Google Gears Takes Ruby on Rails Offline. eWeek. [2009-03-21]. 

外部链接 编辑