Bypass F5 and BACKSPACE

Bypass F5 and BACKSPACE

Hi,
i created a js that bypass the standard behaviour of F5 and BACKSPACE key.
It runs in the major browsers.

Is that the right way for do this kind of work or i missing something?

  1. $ (document ). keypress ( function (event ) {
  2.                 if ($. browser. mozilla || $. browser. opera ) {
  3.                                 if (event. keyCode == '116' || event. keyCode == '8' ) {
  4.                                                 event. preventDefault ( ) ;
  5.                                 }
  6.                 }
  7. } ) ;
  8. $ (document ). keydown ( function (event ) {
  9.                 if ($. browser. webkit || $. browser. msie ) {
  10.                                 if (event. keyCode == '116' || event. keyCode == '8' ) {
  11.                                                 event. preventDefault ( ) ;
  12.                                 }
  13.                 }
  14. } ) ;
  15. </script >

It is util in a mine context, but i know that is possible for advanced user bypass this kind of hack.