PHF: Portable Hypertext Format

Nov 2, 2005

Have you ever wanted to save a webpage for later printing, or for emailing, or burning to an offline media? Saving pages with a browser requires that you also download a folder full of extras: images, stylesheets and javascripts, which really hurt portability.

What if you could save a webpage in such a format that all external files were encoded and included in a single page? You could then easily email this page, or save it for printing at a later date without having to worry about any extra files.

I've been working on a little PHP script to do just this, and I've posted a beta version of the script here. Try saving your favorite pages in a single file format, easy to email or transfer while still looking completely like the original.

I call these generated pages PHFs for Portable Hypertext Format, since they have the same sort of portability as PDFs (Portable Document Format)

This mechanism uses the data protocol to embed files into the HTML page. Newer browsers like Opera and Firefox can use these URIs, but unfortunately, MSIE cannot. You'll just get broken images and stylesheets if you try to load a generated PHF file in Internet Explorer.

Please let me know if you find any bugs, using the email address provided at the bottom of the page above. Eventually I hope to release the code to the public for other people to use on their servers.

Orca Search 2.0 Final now available Orca Search 2.0b released

Comments closed

  • Nov 05, 2005 - 0:45

    # Comment by anonymous

    This is AWESOME! It's like .mht in Internet Explorer, but not locked down by Microsoft. And it totally makes sense, too. Excellent Work! I'd like to see Opera 9 incorperate this locally--that'd be SO awesome! Have you contacted Opera staff about this?

  • Nov 23, 2005 - 15:30

    # Comment by Ketlan

    Gravatar

    Absolutely superb - and a lot truer to the original page than Acrobat. You've made a great job of this and I'll be glad to set up space on my server so it can be run from here too. Ten gold stars from me!
    I'll let you know when the mirror's up and running.