How to Disable JavaScript IE Warnings/Errors for a Joomla Website?

Your Joomla website works perfectly on Firefox and Chrome – yet, for some reason, your website has at least one JavaScript warning on IE, which makes your website sound as if it’s unprofessional and/or insecure. This will most likely lower your conversions on your website.

The reason of having a JavaScript error on Internet Explorer, and not on the others browsers (such as Firefox or Chrome), is because IE often violates some JavaScript standards and does not respect some general (but not formal) guidelines in its JavaScript parser. So, a code that is 100% JavaScript compliant might not work on IE, and a JS code that works on other browsers may also not work on IE. In many cases, that JavaScript code causing the problem is not important to run or is irrelevant in an IE browser. So, what can the person do, besides fixing the actual JS code (which tends to be very complicated especially if the person is not a programmer), to suppress the warnings on IE?

Surprisingly, doing so is a very simple task, all you need to do is to add the following code to your index.php file, which is located under the root directory of your Joomla website:

<script language="JavaScript">
	function supressError(){
		return true;
	window.onerror = return supressError();

As you can see, it’s a very simple process, and it can save you hours and hours of work to solve an annoying and unimportant JavaScript problem.

In case you need any help doing the above, then just contact us. We’ll do it for you at a lighting speed and we’ll charge you a very reasonable fee.

No comments yet.

Leave a comment