正在加载图片...
要注意的是这个离线资源是和浏览器的缓存无关的,可以拔掉网线,删除浏 览器缓存,这时仍然可以通过常规URL(比如:htp!/ /code. google. com/apis/q ears/ samples/hello world resourcestore htm)访问页面的功能! Google Gears Resource store Demo To see how this works, use the view source feature of your browser Create Store Capture Uncapture Remove Store Capturing /apis/gears/samples/hello world resourcestore html captured succeeded sample. js captured succeeded mple. css captured succeeded gears_init s captured succeeded This page demonstrates basic usage of Resource Store Things you can d Press the Create Store button to create a resource store to contain captured Press the Capture button to capture this page o Unplug the network cable and verify that you can still access this page o Delete your browser cache and verify that you can still access this page Press the Uncapture button to remove the page from the Resource Store. Verify that can no longer access the page offline Press the Remove Store button to remove the resource store 口口 Internet 该应用的初始化阶段,需要用js先创建本地服务器对象 var localserver= google gears. factory create(beta. localserver,1.0) 例子界面中的几个按钮功能的分析如下 1. CreateStore:创建一个 Store。 Store之于 Localserver,类似于数据库 的 Table之于 DataBase的关系。 var STORE =helloworld-store /如果该名称的 Store已经存在,则会打开已有的 var store= localserver. createstore (STORE_NAME)要注意的是这个离线资源是和浏览器的缓存无关的,可以拔掉网线,删除浏 览器缓存,这时仍然可以通过常规 URL (比如:http://code.google.com/apis/g ears/samples/hello_world_resourcestore.html)访问页面的功能! 该应用的初始化阶段,需要用 js 先创建本地服务器对象: var localServer = google.gears.factory.create('beta.localserver', '1.0'); 例子界面中的几个按钮功能的分析如下: 1. CreateStore:创建一个 Store。Store 之于 LocalServer,类似于数据库 的 Table 之于 DataBase 的关系。 var STORE_NAME = 'helloworld-store'; // 如果该名称的 Store 已经存在,则会打开已有的。 var store = localServer.createStore(STORE_NAME);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有