 
             guard let htmlData = data else {
                 printLog("fetch html error : \(error)")
-                completionHandler(data: data, resources: nil, error: ArchiveErrorType.FetchHTMLError)
+                completionHandler(data: data, metaData: nil, resources: nil, error: ArchiveErrorType.FetchHTMLError)
                 return
             }
 
             guard let html = (NSString(data: htmlData, encoding: NSUTF8StringEncoding) as? String) else {
                 printLog("html invalid")
-                completionHandler(data: data, resources: nil, error: ArchiveErrorType.HTMLInvalid)
+                completionHandler(data: data, metaData: nil, resources: nil, error: ArchiveErrorType.HTMLInvalid)
                 return
             }
 
             guard let doc = try? HTMLDocument(string: html, encoding: NSUTF8StringEncoding) else {
                 printLog("init html doc error, html : \(html)")
-                completionHandler(data: data, resources: nil, error: ArchiveErrorType.FailToInitHTMLDocument)
+                completionHandler(data: data, metaData: nil, resources: nil, error: ArchiveErrorType.FailToInitHTMLDocument)
                 return
             }
 
             printLog("html --> \(html)")
+            
+            var metaData = [String: String?]()
+            if let htmlTitle = doc.title {
+                metaData[ArchivedWebpageMetaKeyTitle] = htmlTitle
+            }
 
             var resources: [String] = []
 

import Fuzi

/// Archive completion handler block
public typealias ArchiveCompletionHandler = (webarchiveData: NSData?, error: ArchiveErrorType?) -> ()

/// Fetch resource paths completion handler block
public typealias FetchResourcePathCompletionHandler = (data: NSData?, resources: [String]?, error: ArchiveErrorType?) -> ()

/// Error type
public enum ArchiveErrorType: ErrorType {

    case PlistSerializeFailed
}

/// Meta data key 'title'
public let ArchivedWebpageMetaKeyTitle = "title"

/// Resource fetch options
public struct ResourceFetchOptions: OptionSetType {
    /// rawValue
