Disable Javascript Errors


This simple script will prevent javascript errors from being displayed in your visitor's browser

<script type="text/javascript">
function noError(){return true;}
window.onerror = noError;

Or jQuery:

return true;

The functionality is very simple: create a function that always returns true, and then whenever an error occurs, call this function (returning true and suppressing the error).

Shamefully, this script is only tested in IE.

Labels: ,
Loading related posts...


Post a Comment

2010 WEBSITE20. All rights reserved.