title: How to refresh page, Google app Script Web
body: <p>Good afternoon.</p>
  
  <p>I am trying to create a button to refresh the page, through the Google app Script Web, but the method "<strong>window.location.reload ();</strong>", does not work could someone help?</p>
  
  <p>link Google app Script Web: <a href="https://script.google.com/d/1jyWe9jm0dIqHsY1uKJZ0pOJYzLuq9dip1cSsXhxBwv53cFakW2LHgM_n/edit?mid=ACjPJvGbLXQwvhjDh7fsdifcTFvgQby-gsIUWeCSmwUzTdnVvXw8LNckG8rXcsyhcYvAcWAN7pU4E05bQEJwZl_1189N-bwyvttAxpHxmbvzUvx_d9SDKh19x3VzY9XxClhXweVlmqdMOSs&amp;uiv=2" rel="nofollow noreferrer">https://script.google.com/d/1jyWe9jm0dIqHsY1uKJZ0pOJYzLuq9dip1cSsXhxBwv53cFakW2LHgM_n/edit?mid=ACjPJvGbLXQwvhjDh7fsdifcTFvgQby-gsIUWeCSmwUzTdnVvXw8LNckG8rXcsyhcYvAcWAN7pU4E05bQEJwZl_1189N-bwyvttAxpHxmbvzUvx_d9SDKh19x3VzY9XxClhXweVlmqdMOSs&amp;uiv=2</a></p>
  
  <pre><code>&lt;html&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;base target="_se"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
  &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"&gt;
  &lt;link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"&gt;
  &lt;script src="http://code.jquery.com/jquery-1.8.3.js"&gt;&lt;/script&gt;
  &lt;script src="http://tablesorter.com/__jquery.tablesorter.min.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>
    </p>
  
  <p></p>
  
  <pre><code>&lt;button onclick="sortTable()"&gt;Sort&lt;/button&gt;
  &lt;button onclick="refresh()"&gt;refresh &lt;/button&gt;
  
    &lt;table class="striped centered ajuste" id="tab"&gt;
             &lt;thead &gt;           
               &lt;tr&gt;
  
                &lt;th&gt;ID&lt;/th&gt;
                &lt;th&gt;NOME&lt;/th&gt;
                &lt;th&gt;DATA&lt;/th&gt;
  
               &lt;/tr&gt;
             &lt;/thead&gt;
              &lt;tbody id="coportoTabela"&gt;
  
              &lt;/tbody&gt;
    &lt;/table&gt;
  </code></pre>
  
  <p> </p>
  
  <p> 
     </p>
  
  <pre><code> document.addEventListener("DOMContentLoaded", function(){
  
          google.script.run.withSuccessHandler(gerarTabela).pegarTabelaEstoque();
  
    });
  
    function gerarTabela(dataArray){
      var tcorpo =  document.getElementById("coportoTabela");    
  
       dataArray.forEach(function(r){
  
       var linha = document.createElement("tr");
  
       var coluna1 = document.createElement("td");
       coluna1.textContent = r[0];
       var coluna2 = document.createElement("td");
       coluna2.textContent = r[1];
       var coluna3 = document.createElement("td");
       coluna3.textContent = r[2];
  
       linha.appendChild(coluna1);
       linha.appendChild(coluna2);
       linha.appendChild(coluna3);
  
       tcorpo.appendChild(linha); 
  
       });      
  
    }
  
  
     function refresh(){
       window.location.reload();
     }     
  </code></pre>
  
  <p></p>
  
  <p>
  </p>