Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2511e8bcd95b7b5

Jump to content

Talk:Web Archive (file format)

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 15 years ago by 123.193.138.96 in topic Not even wrong

Not even wrong

[edit]

Webarchives are simply ObjC plist representations of the web DOM that happens to include the embedded binary files.

It's NSKeyedArchiver, not NSKeyedEncoder (maybe older versions of ObjC). But that doesn't really matter much. You can extract to a plist with NSPropertyListSerialization from an NSData image of the NSBundle file (the web archive itself).

You can find ~10 line ObjC code snippet ("Restoring a property list (Objective-C)") to build a property list for a web archive in the Apple "Property List Programming Guide" under "Serializing a Property List". Just change the BSBundle:pathForResource:ofType type from "plist" to "webarchive" and feed it the file in place of @"Data" - it's coded for a "Data.plist" file. Then you have a property list that resembles an XML DOM except that it's accessed through dictionaries and arrays instead of XML API or XPATH calls.

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/SerializePlist/SerializePlist.html

You can also load a WebArchive into the developer tool shipped Property List Editor application to understand the webarchive plist structure without writing any code.

http://en.wikipedia.org/wiki/Apple_Developer_Tools#Property_List_Editor

It's not rocket science. — Preceding unsigned comment added by 123.193.138.96 (talk) 00:05, 4 July 2011 (UTC)Reply