[Sugar-devel] Keep offline for Browse (offline bookmarks)

Lucian Branescu lucian.branescu at gmail.com
Tue Nov 10 05:19:39 EST 2009


I've tried jar:, but there were numerous issues with navigating to
other pages. Also, it was quite hard to get Browse to actually open
that URI, it kept trying to prettify it.

On top of that, jar: has been deprecated because of security issues.

After investigating jar: I found out that it actually unzips things in
temporary storage anyway. So I could easily replace jar: with two
lines of code and not bother with its problems. The only thing my code
doesn't do that jar: does is very prompt cleanup.

2009/11/10 S Page <skierpage at gmail.com>:
> On Sun, Nov 8, 2009 at 7:17 AM, Lucian Branescu
>> Besides being able to save pages for offline use, this patch will also
>> allow distribution of HTML content in .zip files that have an
>> 'index.html' inside. Browse will happily open such files (but they may
>> need certain metadata).
>
> Why not browse the .zip files using the jar: protocol wrapper instead
> of unzipping them to temporary storage?  When handling a zip file, you
> should be able to just wrap it with
> jar:file:///path/to/zip!/index.html and hand this to the browser.  In
> the mailing list thread "directly browsing compressed content in the
> datastore" Benjamin Schwartz mentioned
>
>> Lucian experimented with jar: for browsing
>> offline webpages, but ultimately rejected it after determining that
>> webpages using javascript would not function properly.
>
> Such pages worked for me, what problems did you encounter?
>
> BTW, since .xol files are ZIP files, your patch and/or the jar:
> protocol means Sugar users could view web content bundles without
> having to unpack them, allowing the distribution of really large
> content bundles.  I filed http://dev.sugarlabs.org/ticket/1258  I
> think this is a sugar-toolkit change, but Tomeu categorized it as a
> Browse bug.
>
> Cheers,
> --
> =S Page
>


More information about the Sugar-devel mailing list