     }
     
     override func viewWillAppear() {
-        guard let doc = self.document, let url = doc.fileURL else { clear(); return }
-        Swift.print("url => \(url.absoluteString)")
+        super.viewWillAppear()
+        
+        guard let doc = self.document, let url = doc.fileURL else { return }
+        
+        switch doc.docGroup {
+        case .playlist:
+            break
+            
+        default:
+            if url.isFileURL {
+                if [k.hpi].contains(url.pathExtension) {
+                    webView.load(URLRequest.init(url: url))
+                }
+                else
+                {
+                    if appDelegate.isSandboxed() != appDelegate.storeBookmark(url: url) {
+                        Swift.print("Yoink, unable to sandbox \(url)")
+                    }
+                    let baseURL = appDelegate.authenticateBaseURL(url)
+                        
+                    webView.loadFileURL(url, allowingReadAccessTo: baseURL)
+                }
+            }
+            else
+            if k.about == url.scheme {
+                webView.loadHTMLString(webView.htmlContents!, baseURL: nil)
+            }
+            else
+            {
+                webView.load(URLRequest.init(url: url))
+            }
+        }
+    }
+    
+    override func viewWillLayout() {
+        //  the autolayout is complete only when the view has appeared.
+        webView.autoresizingMask = [.height,.width]
+        if 0 == webView.constraints.count { webView.fit(webView.superview!) }
+         
+        borderView.autoresizingMask = [.height,.width]
+        if 0 == borderView.constraints.count { borderView.fit(borderView.superview!) }
     }
     
     override func viewDidAppear() {

                case .URL, .fileURL:
                    if let urlString = item.string(forType: type), let url = URL.init(string: urlString) {
                        // MARK: TODO: load new files in distinct windows
                        if url.isFileURL /*dirty*/ { viewOptions.insert(.t_view) }
                        
                        if viewOptions.contains(.t_view) {
                            handled += self.appDelegate.openURLInNewWindow(url, attachTo: window) ? 1 : 0

        if let url = self.selectedURL {
            load(URLRequest.init(url: url))
        }
    }
    
    @objc func openLinkInNewWindow(_ item: NSMenuItem) {
        if let urlString = self.selectedText, let url = URL.init(string: urlString) {
