which page is accessed when user is offline

0 views
Skip to first unread message

ravi181229

unread,
Aug 19, 2009, 2:43:03 PM8/19/09
to Gears Users
Hi,

I have a basic doubt:
I have a script file in www.myserver.com/ggears.html
I also created a desktop shortcut for this.
Now, when user goes offline (no internet connection) then which file
does he access ?
When user clicks on desktop shortcut (which was created) , which file
is executed to work offline ?
Is there any file created local to the users computer
or is there some kind of ggear thing that uses the browser cache ?

Can I create a php file ( www.myserver.com/ggears.php) and write php
script also along with gears code ?

Please explain.
Ravi

Merhawie

unread,
Aug 19, 2009, 2:45:51 PM8/19/09
to gears...@googlegroups.com
The url of your page will be served from the localserver either way. The content of that page can be updated though while online.

ravi181229

unread,
Aug 19, 2009, 3:24:34 PM8/19/09
to Gears Users
Would any one explain more on this please.

On Aug 19, 11:45 pm, Merhawie <merha...@gmail.com> wrote:
> The url of your page will be served from the localserver either way. The
> content of that page can be updated though while online.
>
> On Wed, Aug 19, 2009 at 12:43 PM, ravi181229 <ravir...@gmail.com> wrote:
>
> > Hi,
>
> > I have a basic doubt:
> > I have a script file inwww.myserver.com/ggears.html
> > I also created a desktop shortcut for this.
> > Now, when user goes offline (no internet connection) then which file
> > does he access ?
> > When user clicks on desktop shortcut (which was created) , which file
> > is executed to work offline ?
> > Is there any file created local to the users computer
> > or is there some kind of ggear thing that uses the browser cache ?
>
> > Can I create a php file (www.myserver.com/ggears.php)  and write php

ravi181229

unread,
Aug 19, 2009, 5:00:22 PM8/19/09
to Gears Users
Hi Merhawie,

ok..I created a desktop shortcut but when I go offline and click on
that..it says 'Failed to Connect' on the browser.
How do I access my application offline ?

Thanks,
Ravi

On Aug 19, 11:45 pm, Merhawie <merha...@gmail.com> wrote:
> The url of your page will be served from the localserver either way. The
> content of that page can be updated though while online.
>
> On Wed, Aug 19, 2009 at 12:43 PM, ravi181229 <ravir...@gmail.com> wrote:
>
> > Hi,
>
> > I have a basic doubt:
> > I have a script file inwww.myserver.com/ggears.html
> > I also created a desktop shortcut for this.
> > Now, when user goes offline (no internet connection) then which file
> > does he access ?
> > When user clicks on desktop shortcut (which was created) , which file
> > is executed to work offline ?
> > Is there any file created local to the users computer
> > or is there some kind of ggear thing that uses the browser cache ?
>
> > Can I create a php file (www.myserver.com/ggears.php)  and write php

Merhawie

unread,
Aug 19, 2009, 5:03:51 PM8/19/09
to gears...@googlegroups.com
is it available if you just enter it into the browser directly while offline?

ravi181229

unread,
Aug 19, 2009, 5:10:58 PM8/19/09
to Gears Users
No, it's not available. same connection error.

On Aug 20, 2:03 am, Merhawie <merha...@gmail.com> wrote:
> is it available if you just enter it into the browser directly while
> offline?
>

ravi181229

unread,
Aug 19, 2009, 5:21:50 PM8/19/09
to Gears Users

Ok..here I found something which may help you to help me.....
When I click on the desktop shortcut, it opens the page and I can
search my data.
If I refresh the browser (either clicking on refresh icon or ctrl+f5),
it says "Failed to Connect" but again if I just put the cursor on the
address bar and enter then it shows my data.

Thanks,
Ravi

On Aug 20, 2:03 am, Merhawie <merha...@gmail.com> wrote:
> is it available if you just enter it into the browser directly while
> offline?
>

Merhawie

unread,
Aug 19, 2009, 7:09:55 PM8/19/09
to gears...@googlegroups.com
Are you sure the localserver is being activated and urls cached?

Eduard Martini

unread,
Aug 20, 2009, 5:53:47 AM8/20/09
to Gears Users
First, desktop shortcut is not related with offline mode. You can
create a desktop shortcut for http://www.mysite.my. When clicking on
shortcut that url is accessed in web browser. Nothing more. It just
opens the web browser at the specified address.

Now, if you have implemented offline access to your application, then
http://www.mysite.my should be available offline. To check that, open
a browser and type your site address there. If it is working, will
work when using desktop shortcut also, if not, not.

Please understand desktop shortcut does not add any functionality,
just opens the browsers and types in the web address. That's all,
nothing more. Any other functionality that you want, should be
implemented.

Hope that helps

On Aug 20, 2:09 am, Merhawie <merha...@gmail.com> wrote:
> Are you sure the localserver is being activated and urls cached?
>

Marcel H.

unread,
Aug 20, 2009, 6:05:42 AM8/20/09
to Gears Users
I've actually had similar issues.

My web application has been cached entirely, but these few files are
key:

login.html -> contains a frameset with the following 2 pages:
login.page.html -> contains a login form.
login.applet.html -> contains a java applet that takes care of the
logins.
applet.jar -> the applet

While there's an active internet connection, it all works brilliantly.
Even if I then go offline and my frame (login.html) detects me going
offline, enabling the offline part. All pages are served by Gears.

But..

When I refresh the page (Ctrl + F5) or clear my browser cache (Ctrl +
Shift + Del in Firefox) and then refresh, Gears refuses to serve me
anything, despite the fact that the files are physically there in the
Gears folder.

Starting the application offline through a desktop shortcut isn't
working, either, regardless of having a browser cache or not.

At every point during my application's Gears javascripting, I've had
the localserver.enabled set to true. But I guess when you close the
browser and use that desktop shortcut, this information is lost
entirely? The Gears software outside of the browser does not serve the
local files by default, even if there is not internet connection?

I guess I'm doing something wrong, though. Any help would be much
appreciated :)

On Aug 20, 11:53 am, Eduard Martini <eduard.mart...@gmail.com> wrote:
> First, desktop shortcut is not related with offline mode. You can
> create a desktop shortcut forhttp://www.mysite.my. When clicking on
> shortcut that url is accessed in web browser. Nothing more. It just
> opens the web browser at the specified address.
>
> Now, if you have implemented offline access to your application, thenhttp://www.mysite.myshould be available offline. To check that, open

Eduard Martini

unread,
Aug 21, 2009, 5:44:16 AM8/21/09
to Gears Users
If you have gears set correctly, you should be able to visit your
site, get the offline version, close browser, delete cache, unplug
internet connection, restart computer, start browser and navigate to
your site and have all working.

If this is not your case, then something is not implemented right. The
easiest way to debug is to run in FF console things like
canServeLocally, lastErrorMessage, currentVersion, etc. Check
http://code.google.com/apis/gears/api_localserver.html for
documentation on those.
> > Now, if you have implemented offline access to your application, thenhttp://www.mysite.myshouldbe available offline. To check that, open

ravi181229

unread,
Aug 26, 2009, 11:38:54 AM8/26/09
to Gears Users
Hi,

I still have a problem accessing app offline (I am using Database
module).
Let me explain how am I doing it so that you can give me some idea:
I have two files (ggears_c.php and ggears_c.html).

I have online file ggears_c.php which has php script (includes
headers,some php script for other features,also has jquery,css files)
and gears script (checking if gears installed, activating my site,
sync using workerPool, listing data fetched from Local DB and Create
Desktop shortcut).

When user clicks on ‘Create Desktop Shortcut’ it points to
ggears_c.html page (which works fine when I am online and which just
fetches data from local DB and display).

Now when I go offline and click on shortcut, it shows ‘Failed to
connect'.
Is there any problem using two files.

Eduard : As you mentioned below "get the offline version", Is there
different way to get the offline version, please explain what do mean
by "get the offline version" ?

Please guide me.

Thanks,
Ravi
> > > Now, if you have implemented offline access to your application, thenhttp://www.mysite.myshouldbeavailable offline. To check that, open

Eduard Martini

unread,
Aug 27, 2009, 6:19:02 AM8/27/09
to Gears Users
You must have that url available offline. That means that url poiting
to your html page should even be in manifest for managed store or
caputred manually captureUrl() for unmanaged store. You can check if
it is with canServeLocaly(url). This should be true for your url that
is loaded.

Also I hope that you are accessing the file trough a http server,
something like:

http://localhost/ggears_c.html not with file:// protocol directly from
disk. Gears not working with file://

On Aug 26, 6:38 pm, ravi181229 <ravir...@gmail.com> wrote:
> Hi,
>
> > > > Now, if you have implemented offline access to your application, thenhttp://www.mysite.myshouldbeavailableoffline. To check that, open

ravi181229

unread,
Sep 1, 2009, 10:59:20 AM9/1/09
to Gears Users
Hi Eduard,

Now, I am able to make my application offline and it works great.
Thanks a lot for pointing me to "manifest for managed store".
cool...

Thanks and Regards,
Ravi

On Aug 27, 3:19 pm, Eduard Martini <eduard.mart...@gmail.com> wrote:
> You must have that url available offline. That means that url poiting
> to your html page should even be in manifest for managed store or
> caputred manually captureUrl() for unmanaged store. You can check if
> it is with canServeLocaly(url). This should be true for your url that
> is loaded.
>
> Also I hope that you are accessing the file trough a http server,
> something like:
>
> http://localhost/ggears_c.htmlnot with file:// protocol directly from
Reply all
Reply to author
Forward
0 new messages