Closed
Bug 529918
Opened 15 years ago
Closed 9 months ago
Offline web applications support (offline storage/OfflineCache.sqlite) doesn't work
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: alqahira, Unassigned)
References
()
Details
We've sort-of known this for a long time (bug 337261 comment 3), but no-one's particularly cared until Ars grilled Sam about it today. Well, not exactly true; hendy looked into it a while ago, and in association with that, I re-read the patches to see if I could find missing xpts or libs or confvars or app-code-needed bits to see why it wasn't working.
As I recall from the investigation, the db gets created (I have ~/Library/Caches/Camino/OfflineCache/index.sqlite) but nothing gets written. Perhaps hendy remembers more and can comment with that and the testcase when he gets back from the farm. (Note the storage spec changed and is implemented differently in 1.9.1--different js calls needed, iirc--so we'd also need to find a testcase that uses the old behavior.)
(If we ever figure out how to enable it, we'd also need some UI for control/clearing.)
Reporter | ||
Comment 1•15 years ago
|
||
Still not sure what's going on with this in 1.9.2; offline mode works, and demos like http://hacks.mozilla.org/2009/06/localstorage/, http://demos.hacks.mozilla.org/openweb/todo/ and http://starkravingfinkle.org/projects/offline/todo.html work, but OfflineCache/index.sqlite still never seems to have any content.
Reporter | ||
Comment 2•15 years ago
|
||
Yeah, so visiting http://starkravingfinkle.org/projects/offline/todo.html in Fx3.6, I get a prompt to be allowed to store data for offline use, and if I agree and enter something in the demo and then open Fx Prefs:Advanced:Network, I see mfinkle has stored something.
Further, there are some cache-looking files in Caches/Firefox/OfflineCache, and index.sqlite actually has data in it.
(Note also Fx does not seem to have an "allow always" option when prompting, which seems sad.)
Reporter | ||
Comment 3•15 years ago
|
||
(In reply to comment #1)
> Still not sure what's going on with this in 1.9.2; offline mode works, and
> demos like http://hacks.mozilla.org/2009/06/localstorage/,
> http://demos.hacks.mozilla.org/openweb/todo/ and
> http://starkravingfinkle.org/projects/offline/todo.html work,
These store their data in webappsstore.sqlite, so that's how they "work".
> OfflineCache/index.sqlite still never seems to have any content.
This is the index for the Offline Cache, which seems to contain (at finkle) the offline manifest and the files specified in the manifest.
Still confused.
Reporter | ||
Comment 4•15 years ago
|
||
Bug 398161 was the meta for this; there are a couple dozen bugs in there that we need to poke through and see if we're missing some module or component or xpt or js file.
I'm still puzzled by why the index exists at all if we don't have the right stuff hooked up; I'm pretty sure we're shipping all the DOM xpts.
Also, since this bug is defacto tracking adding UI, Fx UI was more-or-less bug 394392, bug 462856, bug 397417 and deps, and bug 399528.
Reporter | ||
Comment 5•15 years ago
|
||
http://html5demos.com/offlineapp is another demo of this. The status field is stuck at "checking", and pressing the "update cache status" button gets me:
12:57 AM: [JavaScript Error: "uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://html5demos.com/offlineapp Line: 37"]"]
Line 37 is
> addEvent(document.querySelector('#update'), 'click', function () {
> window.applicationCache.update();
> });
One of the places where the applicationCache event or whatever is referenced is dom/public/idl/base/nsIDOMWindow2.idl, which was added as a way to let embedders do stuff with events (bug 129602); do we maybe have to do something with that .h? Dunno.
Summary: Offline storage doesn't work → Offline web applications support (offline storage/OfflineCache.sqlite) doesn't work
Reporter | ||
Comment 6•14 years ago
|
||
Awesome; I just "figured" this out (hat tip to ovvldc who got me thinking about it again).
We need to add the UI in bug 394392, more specifically the UI-driving stuff that "listens" for offline-app request "notifications" (maybe just parses the page for the manifest URL, like we parse for feeds; not sure) and then shows the prompt, and hooks up to the permissions manager: https://bugzilla.mozilla.org/attachment.cgi?id=297040&action=diff#a/browser/components/preferences/advanced.js_sec2
(We'll obviously want to run through all the UI changes and listener fixes that occurred in the follow-up bugs listed in comment 4 and/or consult the current state of the Firefox code so that we aren't porting broken Firefox code.)
Also, there's a nice "always allow" pref built into Gecko; set
// Always enable offline apps support, without prompting
pref("offline-apps.allow_by_default", true);
in your prefs to see offline cache in action (about:cache to see the items getting added).
Reporter | ||
Comment 7•14 years ago
|
||
Since this is a web-compat issue and something that's ostensibly part of Gecko, and since we now "know" what we need to do to fix it, we ought to consider it for 2.1.
We won't block on it unless there's a patch in progress, but we ought to consider this "wanted" (it would be more wanted if Gmail weren't still using Gears for offline :P ).
Flags: camino2.1?
Reporter | ||
Comment 8•14 years ago
|
||
Gah, pasted the wrong patch-hunk link.
(In reply to comment #6)
> We need to add the UI in bug 394392, more specifically the UI-driving stuff
> that "listens" for offline-app request "notifications" (maybe just parses the
> page for the manifest URL, like we parse for feeds; not sure) and then shows
> the prompt
https://bugzilla.mozilla.org/attachment.cgi?id=297040&action=diff#a/browser/base/content/browser.js_sec4
> and hooks up to the permissions manager:
> https://bugzilla.mozilla.org/attachment.cgi?id=297040&action=diff#a/browser/components/preferences/advanced.js_sec2
Reporter | ||
Comment 9•14 years ago
|
||
Google Docs offline capabilities are set to re-appear early 2011 with "HTML5", presumably this offline cache: http://www.theregister.co.uk/2010/12/08/google_docs_offline_returns/
Reporter | ||
Updated•13 years ago
|
Flags: camino2.1? → camino2.1-
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•