mozilla / universal-search-addon

DEPRECATED please check new add-on at this link -->
https://github.com/mozilla/universal-search
5 stars 6 forks source link

Addon should work when offline #98

Open johngruen opened 8 years ago

johngruen commented 8 years ago

The iframe should always be available, and should work if the network is gone: that is, if there's no network response, or there's a network error, fill the iframe with local history results. (This is another argument for getting rid of those subheadings.)


John's original comments:

Discovered this at the start of a new session...we should come up with a better solution here.

screen shot 2015-08-05 at 8 57 08 am
ckarlof commented 8 years ago

You might be able to use some of the approach here: https://bugzilla.mozilla.org/show_bug.cgi?id=959844

jaredhirsch commented 8 years ago

If possible, maybe we can just ship the iframe with the addon? Might be the simplest possible solution for Q4.

jaredhirsch commented 8 years ago

There's also some interesting use of Service Workers in the remote-newtab code, but that seems fancier.

jaredhirsch commented 8 years ago

great suggestion from chuck: "we use something like this https://github.com/GoogleChrome/sw-precache to precache all the things on first load, and background synchronization to pull updates https://wicg.github.io/BackgroundSync/spec/"

jaredhirsch commented 8 years ago

seems reasonable to assume that the first run will have network available, since installing the addon will require clicking a button on the idea town website.

in which case, service workers might be the ideal solution

jaredhirsch commented 8 years ago

Bumping out of the Mozlando milestone only because time is tight

jaredhirsch commented 8 years ago

We're going to explore embedding the iframe inside the addon, rather than serving it remotely. Closing this in favor of #183