7 messages in com.googlegroups.google-gears[google-gears] Re: Working offline fo...
FromSent OnAttachments
rameshj21 Feb 2008 21:02 
Ben Lisbakken21 Feb 2008 21:41 
rameshj22 Feb 2008 21:55 
sarch21 Apr 2008 01:05 
Ben Lisbakken21 Apr 2008 09:46 
sarch21 Apr 2008 19:51 
Ben Lisbakken23 Apr 2008 08:30 
Subject:[google-gears] Re: Working offline for non-accessed html files
From:Ben Lisbakken (lisb@google.com)
Date:04/21/2008 09:46:06 AM
List:com.googlegroups.google-gears

Sarch --

Here's some documentation on the manifest file ( http://code.google.com/apis/gears/api_localserver.html#manifest_file).

{ "betaManifestVersion": 1, "version": "1", "entries": [ { "url": "http://localhost:8080/managed/student.html" }, { "url": "http://localhost:8080/managed/teacher.html" } ] }

That is what you'll want your manifest file to look like. The URL property will specify what URL you want to have stored, and then the next time your browser accesses that URL Gears will intercept the request and serve the file from cache.

Before you were using "url" and "src" properties. When you make a manifest file that way, you use the "src" property to specify what file you want to have cached, then you use the "url" property to specify the URL that will serve this cached resource. So, if you set the "src" to student.html and the "url" to test.html, that means that the file student.html will be served to the browser when test.html is requested.

-Ben

On Mon, Apr 21, 2008 at 1:06 AM, sarch <kang@126.com> wrote:

Hi,Ben I want to know how to write the manifest file. for example,i have a html file named student.html,and at teacher.html i capture the student.html,the manifest file content like this: { "url": "http://localhost:8080/managed/managed_store.html", "src": "managed_store_v2.html" }, { "url": "http://localhost:8080/managed/managed_store.js", "src": "managed_store_v2.js" }, that's right?