Stop it from bothering the user with error warnings in JavaScript

by Yang Yang on September 25, 2007

in JavaScript Tips & Tutorials

Use the following line to keep the browser or console from warning the user of your program errors.

window.onerror = function( ) { return true; }

That’s it! :)

Related Posts

{ 2 comments… read them below or add one }

Nattttttthan October 11, 2008 at 8:33 pm

It’s the single best javascript tip I’ve found with regards to end user experiences….lol… Thanks for sharing!

Reply

Yang Yang February 26, 2010 at 3:04 pm

Ya, it is. JavaScript errors would simply defame a website in trust and competence to serve.

Reply

Leave a Comment

Previous post:

Next post: