         self.webView.navigationDelegate = self
     }
     
-//    override func viewDidDisappear(animated: Bool)
-//    {
-//        super.viewDidDisappear(animated)
-//        
-//        // Hack to reload right content on back action
-//        if self.urlToLoad != nil {
-//            self.webView.loadRequest(createUrlRequest(self.urlToLoad))
-//        }
-//    }
+    override func viewDidDisappear(animated: Bool)
+    {
+        super.viewDidDisappear(animated)
+        
+        // Hack to reload right content on back action
+        if self.urlToLoad != nil {
+            self.webViewLoaded = false
+            self.webView.loadRequest(createUrlRequest(self.urlToLoad))
+        }
+    }
     
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()

    
    func webView(webView: WKWebView!, decidePolicyForNavigationAction navigationAction: WKNavigationAction!, decisionHandler: ((WKNavigationActionPolicy) -> Void)!)
    {
        println("POLICY ACTION : \(webView.URL.absoluteString?)")
        
        if self.webViewLoaded
        {
            // Cancel webview navigation
            decisionHandler(WKNavigationActionPolicy.Cancel)
            self.webView.stopLoading()
            
//            // Push new webview controller to  navigation controller
//            let webVC = self.storyboard?.instantiateViewControllerWithIdentifier("webViewController") as WebViewController
//            webVC.urlToLoad = webView.URL.absoluteString
//            self.navigationController?.pushViewController(webVC, animated: true)
        }
            
        else {
            decisionHandler(WKNavigationActionPolicy.Allow)
        }
        
    }
    
    func webView(webView: WKWebView!, decidePolicyForNavigationResponse navigationResponse: WKNavigationResponse!, decisionHandler: ((WKNavigationResponsePolicy) -> Void)!) {
        decisionHandler(WKNavigationResponsePolicy.Allow)
        println("POLICY RESPONSE : \(webView.URL.absoluteString?)")
    }
    
    func webView(webView: WKWebView!, didCommitNavigation navigation: WKNavigation!) {
        println("DID COMMIT NAVIGATION: \(webView.URL.absoluteString?)")
    }
    
    func webView(webView: WKWebView!, didStartProvisionalNavigation navigation: WKNavigation!) {
        println("DID START PROVISIONAL NAVIGATION: \(webView.URL.absoluteString?)")
    }
    
    func webView(webView: WKWebView!, didReceiveServerRedirectForProvisionalNavigation navigation: WKNavigation!) {
        println("DID RECEIVE SERVER REDIRECT: \(webView.URL.absoluteString?)")
    }
}


    var webView: WKWebView!
    var webViewLoaded = false
    var urlToLoad: String?
    var identifier = 1
    
    
    // MARK: ViewController methods
