Bug 146571

Summary: WKWebView should provide a public API to get Web Archive data
Product: WebKit Reporter: Ari Weinstein <ari>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: andersca, kc, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   

Description Ari Weinstein 2015-07-02 18:43:29 PDT
Web Archives are a very useful serialization format for web content. It would be really great if WKWebView offered a way to get the web archive data from a loaded web view so that it can be saved for later/offline usage, or converted to another format.

Currently, there is a private method named - (void)_getWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler, but there is no public functionality.

Developers may currently resort to using UIWebView and programmatically selecting the page content, copying it to the pasteboard, and getting the Web Archive data from there, but this is problematic and inefficient.
Comment 1 Ari Weinstein 2015-07-02 18:44:55 PDT
rdar://21429104 (closed as dup of rdar://17317547)