Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'The best site archive format: iCab's vanilla ZIP' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The best site archive format: iCab's vanilla ZIP
Authored by: VRic on Apr 13, '04 07:11:08AM

The best archive format for web pages or sites is iCab's genious archive format: plain vanilla ZIP. Others will wake up someday and realize that, let's just hope they'll then acknowledge where it came from and won't make it just different enough to break compatibility.

iCab's "Save" (for current page) and "Download" (to follow links) commands put the exact content in a zip archive (replicating all files and folders hierarchy, with the domains as root folders). Some pages generated on the fly by scripts don't exist as files on the server and may not expand correctly from the archives, but anything else is transparent.

iCab has countless clever features, but the tricks to do this with vanilla zip files are incredibly brilliant and put all other browsers' ridiculous attempts to shame:

- you can share the archives with any user of any browser on any platform. They will have to decompress the archive unless other browsers authors see the light, but at least it's possible, unlike IE's stupid proprietary format, which isn't even compressed (not to mention stupid IE RE-DOWNLOADS the current page to save it even though it's already in RAM, in RAM cache, and in disk cache, idiots). By the way, iCab's homepage has a conversion utility from IE's useless archives to iCab's cross-platform zip

- RELATIVE LINKS still work in iCab, yet there's absolutely NO ALTERATION of the code or structure unlike any other tools that claim to "preserve" the links (everything that is in the archive is read from there, everything that isn't is found transparently on the web thanks to an obvious trick to preserve the original URL: simply deduce it from the archive's folder structure), of course relative links won't work if you extract the files from the archive to somewhere on your disk, but that's exactly what any web page author would expect since you get the exact original content (tools that alter the code to make relative links absolute are useless as archive formats for authors, who wrote relative links for a reason)

- the archive is a standard zip file with absolutely no proprietary addition, just add ".zip" to the name to share it with PCs

- to tell that iCab owns it, it has ZIP•/iCAB type/creator codes and an empty "iCabWebArchive" file at the root of the archive (which may be useful if PCs and non-HFS disks kill the type codes)

- the first compressed file in the archive being the current page's source code, that's how iCab finds out where to start in a complex hierarchy, which is an insanely simple trick (of course non-iCab users who extract the files will have a harder time finding the relevant start page manually if the original had parts in countless folders and domains)

- there's nothing stopping you from editing the archive or forging one manually: just make sure the empty "iCabWebArchive" file is there and that your starting page is the first added to the archive (ZipIt has an "order" sort column to show that), then set its type/creator to ZIP•/iCAB (the 4th char in "ZIP•" is a "big dot" bullet).

Example, here's how this page looks in an iCab archive:

iCabWebArchive (empty file)
www.macosxhints.com (folder)
  article.php?sto0040407190019282 (html source as seen in the URL)
  images (folder)
    chm_viewS.jpg
    chm_xS.jpg
    thebook3.gif
    w_7.png
    w_chms.jpg
  layout (folder)
    Classic (folder)
      images (folder)
        topics (folder)
          rg-pick.gif
      style.php
      theme-images (folder)
        osxhints2.jpg
        pixel.gif

Now let's say I'd like to archive the linked screenshots too, but I don't want to download every linked file at level 2 or scratch my head to find how to filter out everything else while downloading. I just need to download those 2 files (option-click on each), look at their address in the browser's status bar or in their Finder comment to know where they belong, then add them to the "images" folder in the archive using ZipIt or StuffIt Deluxe or whatever (and reset the archive's type/creator if the zip program changed that).



[ Reply to This | # ]