Read my previous comment.
Last line says: "getting them from online
server even if available offline, can be enforced by setting
store.enabled=false if internet_connection_available. ".

So, if an url is stored on local store (managed or not), it will be
always served from there, unless you disable that store using enabled
property.

On Jan 27, 9:54 pm, TML <[email protected]> wrote:
> Hi, Does anyone have any resources about enforcing the scenario
> whereby "if connected to web server> use files/ data from web server.
> If not connected to web server>use data/files/gui from local server
> (like pda with Win Mobile 6)?
> thanks, TML
>
> On Jan 27, 9:06 am, "Tosca Lahiri" <[email protected]> wrote:
>
> > How do I  "enforce" to server from real server"
> >  when internet connection exists or from local server if there is no
> > internet connection?
> > Do I do it somewhere when I create the localserver, or when I check whether
> > the server is available (using the ping code from the online docs)? I am not
> > sure how the bits fit together. Do you know of a tutorial or example that
> > enforces this scenario?
> > Thanks.
>
> > > -----Original Message-----
> > > From: [email protected] [mailto:[email protected]]
> > > On Behalf Of sobolanul
> > > Sent: Tuesday, January 27, 2009 8:42 AM
> > > To: Gears Users
> > > Subject: [gears-users] Re: Data switch
>
> > > If you have urls captured in local stores, that url will be always
> > > served from local store. you can "enforce" to server from real server
> > > when internet connection exists or to use local database and resources
> > > even if an internet connection exists. It's application specific.
> > > For example for a static site where all pages are static html and all
> > > are captured on local store, there is no need to use a data switch.
> > > Once captured, the site will be always served from local store at high
> > > speed. Just don't forget to update manifest version when you change
> > > someghin on server.
> > > On the other hand, if you have a site where online functionality is
> > > reproduce offline in javascript and user actually "works" on a
> > > resource, a data switch is recomandavbe to synchronize the on/off line
> > > resources and be sure the user keep working on same set of resources.
> > > Also on pages with high content change, getting them from online
> > > server even if available offline, can be enforced by setting
> > > store.enabled=false if internet_connection_available.
>
> > > On Jan 27, 12:09 am, TML <[email protected]> wrote:
> > > >http://code.google.com/apis/gears/architecture.html
>
> > > > Hello,
>
> > > > I read in the online docs that the architecture suggests a "data
> > > > switch" to switch between using the data from the server and the data
> > > > from the local device.
>
> > > > Does this need to be explicitly programmed, or does using the
> > > > ManagedResourceStore/LocalServer combination make the switch?
>
> > > > I have the modules (database, localserver) working in isolation I am
> > > > trying to put it all together.
>
> > > > Thanks,
> > > > TML

Reply via email to