title: Run javascript function only for one time (first page load)
body: <p>I'd like to run this javascript function only for one time (first page load). Is it possible? Thank you</p>
  
  <pre><code>&lt;div id="pag"&gt;
  &lt;script type="text/javascript"&gt;
  
  var framekiller = true;
  
  window.onbeforeunload = function () {
  if (framekiller) {
      return "Click on stay on this page";
  }
  };
  
  &lt;/script&gt;
  
  &lt;iframe scr="http://www.example.com/page-with-javascript-framebuster.html"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  </code></pre>