title: How to refresh page on resize?
body: <p>Is there a script to make the browser refresh when a page is re-sized? More specifically, one that emulates the browser refresh button or F5? I've found two, but they don't quite do what I'm looking for;</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var currheight = document.documentElement.clientHeight;
  window.onresize = function(){
      if(currheight != document.documentElement.clientHeight) {
          location.replace(location.href);
      }    
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;body onResize="window.location=window.location;"&gt;
  </code></pre>
  
  <p>The problem with these two is they appear to completely reset the page where as using the browsers refresh function leaves some user made changes intact (like being at a specific hash for instance) which is what I need. </p>
  
  <p>So is there a way to refresh the window on re-size with a script similar to if the browser refresh was clicked? I don't understand why there is even a difference but there is.</p>
  
  <p>Thanks.</p>