4 messages in com.googlegroups.google-gearsRe: Expected from Gears or Not ????
FromSent OnAttachments
cgp...@gmail.com01 Jun 2007 03:13 
yonatan26 Jun 2007 15:54 
Scott Hess26 Jun 2007 16:20 
moritz26 Jun 2007 16:53 
Subject:Re: Expected from Gears or Not ????
From:yonatan (yona@gmail.com)
Date:06/26/2007 03:54:25 PM
List:com.googlegroups.google-gears

I've just encountered the same problem with my site. it would be great if I could just add a line like this to the manifest file:

{ "url": "www.mysite.com", "url-param" : "appId"}

and that would match the URLs:

http://www.mysite.com?appId=1 http://www.mysite.com?appId=3 http://www.mysite.com?someOtherParam=hello&appId=5 (here the parameter is somewhere in the url, not necessarily immediately after the base address)

and cache each of them separately, fetching the appropriate one on appropriate requests.

to cgpitt - I'm not sure your suggestion (if I understand it correctly) would fit this scenario, since I definitely don't want to put ALL pages in my site in the manifest file - only those the user visited, and tracking them in the DB isn't so desirable (especially if we could NOT do it :) )

On Jun 1, 1:13 pm, "cgp@gmail.com" <cgp@gmail.com> wrote:

Forgive me if I'm missing the point, but if you wanted to add all possible db generated pages to themanifestfile, then you are looking at using a server side language such as php. You can create a file called 'manifest.php' and set the response headers to 'text/ javascript'. Then you simply get all of your database records and iterate through them, echoing lines to themanifestfile.

e.g:

<?php //manifest.json include('db.php');

echoString = '{"betaManifestVersion": 1, "version": "1.0", "entries": ['; $myPages = getMyPages();

foreach ($myPages as $myPage) { $echoString .= '{ "url": "http://www.mysite.com/mypage?id='. $myPage-

id . '"},';

}

substr($echoString, 0, count($echoString) - 1); $echoString .= ']}';

header('Content-type: text/javascript'); echo $echoString;

?>

On May 31, 10:32 pm, animesh <anim@gmail.com> wrote:

I had a apache struts site already set up so was integrating gears just to see if it can be useful. Don't want to be too negative but I think these functionalities will be there in future versions or ya I might be missing something still in understanding.

Firstly adding all the entries in json file is cubersome. So suppose I am browsing my site, and I want to capture all pages I visited. Now pages have querystrings also with some id='1' id='2' etc which makes every URL Unique, so will it be in json like

tat is cubersome right?

Should just be

http://www.mysite.com/mypage, I know not possible @ this stage coz each id involves seperate database calls. But again if everything is stored on user side then also it's too bulky. Imagine 1000 ids being stored on user side. Any other idea to solve this problem???

Or I guess, doesn't come under inspection too :) (thinkin way too wierd ;) )

Combine this wid forms authentication and it's a mess.