7 messages in com.googlegroups.google-gears[google-gears] Re: Working offline fo...| From | Sent On | Attachments |
|---|---|---|
| rameshj | 21 Feb 2008 21:02 | |
| Ben Lisbakken | 21 Feb 2008 21:41 | |
| rameshj | 22 Feb 2008 21:55 | |
| sarch | 21 Apr 2008 01:05 | |
| Ben Lisbakken | 21 Apr 2008 09:46 | |
| sarch | 21 Apr 2008 19:51 | |
| Ben Lisbakken | 23 Apr 2008 08:30 |
| Subject: | [google-gears] Re: Working offline for non-accessed html files![]() |
|---|---|
| From: | Ben Lisbakken (lisb...@google.com) |
| Date: | 04/23/2008 08:30:30 AM |
| List: | com.googlegroups.google-gears |
Sarach --
It looks like you've got two directories of the stuff you want to capture. I would suggest just doing one directory for this sample, and one copy of the resources.
For example, is there a reason why you want to use http://127.0.0.1:8080/GoogleGears_SamplesAndTools/ samples/hello_world_managedstore/managed_store.html<http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/hello_world_managedstore/managed_store.html>to capture the managed_store.html file in /hello_world/managedstore_test? Did you know that you can have your this file capture itself?
With that aside, it looks like your problem is that you are capturing managed_store_v1.js, managed_store_demo_utils.js and maybe some of the others to the wrong URLs. For your hello_world_managedstore_test/managed_store.html file you need to have the script tag point to: <script type="text/javascript" src="../hello_world_managedstore_test/managed_store_demo_utils.js"></script>
What you've done is captured the managed_store.html file in the hello_world_managedstore_test directory but captured all of the resources it needs in the hello_world_managedstore directory. Since you haven't changed the URLs in managed_store.html, it is still looking in hello_world_managedstore_test for those files.
-Ben
On Mon, Apr 21, 2008 at 7:51 PM, sarch <kang...@126.com> wrote:
Hi,Ben i had not described my question clearly.For example,i use the Sample Application and do some modified In Sample application there is \hello_world_managedstore for ManagedResourceStore,and i add another folder named hello_world_managedstore_test and copy all hello_world_managedstore 's files to this new folder.Then i modified the file "managed_store.js" like that: ....... var store = localServer.createManagedStore("store8888"); store.manifestUrl = '../hello_world_managedstore_test/ manifest_v1.json'; store.checkForUpdate(); ........ when i use the url"http://127.0.0.1:8080/GoogleGears_SamplesAndTools/ samples/hello_world_managedstore/managed_store.html<http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/hello_world_managedstore/managed_store.html>" to capture the hello_world_managedstore_test folder's content. Then i want to run the url"http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/ hello_world_managedstore_test/managed_store.html<http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/hello_world_managedstore_test/managed_store.html>" ,It is means that i want to capture non-accessed url and files.
the file ../hello_world_managedstore_test/manifest_v1.json like that: "entries": [ { "url": "http://127.0.0.1:8080/GoogleGears_SamplesAndTools/ samples/hello_world_managedstore_test/managed_store.html<http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/hello_world_managedstore_test/managed_store.html> ", "src": "managed_store_v1.html" }, { "url": "managed_store_v1.js", "src": "managed_store_v1.js" }, { "url": "managed_store_demo_utils.js" , "src": "managed_store_demo_utils.js"}, { "url": "sample.css", "src": "../sample.css" }, { "url": "sample.js", "src": "../sample.js" }, { "url": "gears_init.js", "src": "../../gears_init.js" } ]
Now i can run the url"http://127.0.0.1:8080/ GoogleGears_SamplesAndTools/samples/hello_world_managedstore_test/ managed_store.html<http://127.0.0.1:8080/GoogleGears_SamplesAndTools/samples/hello_world_managedstore_test/managed_store.html>" and it can find the server file but the js file in the managed_store_v1.html:<script type="text/javascript" src="managed_store_demo_utils.js"></script> can't find.Why?should i use the same url in mainfest.json ?And can i use relatively ?




