title: Unable to disable F5 key in IE8
body: <p>I want to disable F5 key in my web application. I am using the following code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  window.onkeydown=function(e) {
                 if (e.keyCode === 116 ) {
                         alert("This action is not allowed");
                         e.keyCode = 0;
                         e.returnValue = false;                  
                         return false;
                     }
  
                 }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt; F5 Test IE8&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above code works fine in Chrome but in IE8 it is not working. On pressing F5 the page gets refreshed on IE8. I have tried using e.preventDefault(), but nothing works. Any help??</p>