title: Web page can be accessed only once using UniWebView
body: <p>This is my code i am trying to open a web page in UIView using UniWebView. The web page opens but just once. cannot open it again. I am using a button to open the page. the button has this scrip and UniWebView attached to it.</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using System.Net;
  using System.IO;
  public class InternetCheck : MonoBehaviour 
  {
      UniWebView _webView;
  
  void Awake()
  {
      _webView = GetComponent&lt;UniWebView&gt; ();
  }
  
  void Start()
  {
  
      _webView.OnLoadComplete += OnLoadComplete;
      _webView.OnWebViewShouldClose += OnWebViewShouldClose;
  }
  
  void OnLoadComplete(UniWebView webView, bool success,string errorMessage)
  {
      if(success)
      {
          webView.Show();
      }
      else
      {
          Debug.LogError("Unable to load");
      }
      webView.ShowToolBar (true);
  }
  
  
  void BtnClicked()
  {
      if (_webView == null) 
      {
          _webView = GetComponent&lt;UniWebView&gt;();      
      }
  
      if(isInternetAvailable())
      {
  
          _webView.insets = new UniWebViewEdgeInsets(0,0,0,0);
          _webView.url = "http://google.com";
          _webView.Load();
      }
      else
          if(!isInternetAvailable())
      {
          _webView.insets = new UniWebViewEdgeInsets(0,0,0,0);
          _webView.url = Application.streamingAssetsPath + "/Privacy Policy _ Terms of Use _ Cartoon Network.html";
          _webView.Load();
      }
  }
  
  
  
  bool OnWebViewShouldClose(UniWebView webView) {
      if (webView == _webView) {
          _webView = null;
  
          return true;
      }
      return false;
  }
  
  public static bool isInternetAvailable()
  {
      string HtmlText = GetHtmlFromUri("http://google.com");
      if(HtmlText == "")
      {
          //MNAndroidMessage.Create(Const.NO_NETWORK_ALERT_TITLE, Const.NO_NETWORK_ALERT_MESSAGE);
          //          Debug.Log (" Please check your internet conection ");
          return false;
      }
      else if(!HtmlText.Contains("schema.org/WebPage"))
      {
          //MNAndroidMessage.Create(Const.NETWORK_LOGIN_ALERT_TITLE, Const.NETWORK_LOGIN_ALERT_MESSAGE);
          //          Debug.Log (" Please check your internet conection might be you need to password to connect");
          return false;
      }
      else
      {
          //          Debug.Log("Network available ");
          return true;
      }
  }
  
  public static string GetHtmlFromUri(string resource)
  {
      string html = string.Empty;
      HttpWebRequest req = (HttpWebRequest)WebRequest.Create(resource);
      try
      {
          using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
          {
              bool isSuccess = (int)resp.StatusCode &lt; 299 &amp;&amp; (int)resp.StatusCode &gt;= 200;
              if (isSuccess)
              {
                  using (StreamReader reader = new StreamReader(resp.GetResponseStream()))
                  {
                      //We are limiting the array to 80 so we don't have
                      //to parse the entire html document feel free to 
                      //adjust (probably stay under 300)
                      char[] cs = new char[80];
                      reader.Read(cs, 0, cs.Length);
                      foreach(char ch in cs)
                      {
                          html +=ch;
                      }
                  }
              }
          }
      }
      catch
      {
          return "";
      }
      return html;
  }
  }
  </code></pre>