Catching users JavaScript errors in your server logs

Markku Uttula has written a little hack that captures JavaScript errors and sends them to his web server log using Ajax. If you would want to do this? Implementation: One PHP file that does both the error writing, and also acts as the script src= to capture errors:window.onerror = function (msg, url, lno) { ... ajax call back […]

Markku Uttula has written a little hack that captures JavaScript errors and sends them to his web server log using Ajax. If you would want to do this? Implementation: One PHP file that does both the error writing, and also acts as the script src= to capture errors:

window.onerror = function (msg, url, lno) {
... ajax call back to the server log ...

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.