Okay, I'm sorta pulling my hair out.  Here's the deal, I just want to
incorporate some very simple LocalServer caching for a CMS app.  No
fancy offline support, no weird DB stuff, just cache everything to run
faster (sorta like what Wordpress is doing).  But so far, every
example I've looked at, well, sucks.  At least insofar that I haven't
been able to adapt a single technique.  And the documentation sucks
pretty hard too, like trying to figure out what the difference between
createStore() and createManagedStore() is. Frankly, I couldn't tell
you given everything I've read.  My goal is to make this as *simple*
as possible, while still being properly functional.

So, let me outline my scenario.  I've dropped the gears_init.js file
on the server, and created a manifest.json file.  They are both in /
html/js/gears on the server.  I want to plug a button into the
bottom.jsp template file to enable or disable gears based on whether
it is or not already.  Here's the code as I've managed so far:
http://pastebin.com/f3d5dd4cf

The other thing I'm not clear on, does the manifest.json file need to
be a path relative to the gears_init.js file (so "manifest.json"), or
something absolute (like "/html/js/gears/manifest.json").  I've also
had to strip out stuff like checkForUpdate() because when it's in
there, I get errors about the function not being defined.  I'm just
surprised how difficult this is proving overall.

Reply via email to