Re: PDF alternative using HTML (proposal)

Craig Francis wrote:
> 
> > I would imagine that if I opened the file /tmp/html-document.hta it
> > would open in my browser and the address bar would show
> > file:///temp/html-document.hta
> > Can I browse to other HTML files in the archive? And if so what is
> > their URL?
> > E.g. Would the file example/otherfile.html inside the archive be at
> > the URL file:///temp/html-document.hta/example/otherfile.html ?
> 
> Personally I wouldn't be using multiple HTML files (I'm currently
> creating reports that are exported as PDF's, which don't have this
> ability)... but I don't see why that feature couldn't be included.
> 
> I like the idea of just appending onto the base path.
> 
> The HTML files themselves can then just do a <a
> href="../../example/otherfile.html"> to help during
> development/testing, or just use <a href="/example/otherfile.html">.

I would recommend using a ! between them, for compatibility with the
"jar: protocol"

This is a little-known firefox-only feature where a url such as:
 jar:file:////tmp/hello.zip!/index.html

would load file /index.html from the zip file
 file:////tmp/hello.zip


It used to support remote urls but that was removed just a couple of
months ago (bug 1215235). You can reenable that by flipping the
network.jar.block-remote-files hidden preference.

The main issue with jar: is that it runs the files in the security
context of the inside url, but changing that so the files would be on
its own isolated context, I think it would completely fill this
usecase.

Removal discussion on mozilla.dev.platform:
https://groups.google.com/forum/#!topic/mozilla.dev.platform/CFd4w8GzdE
I/discussion


Regards

Received on Saturday, 16 January 2016 23:08:08 UTC