SocialEngine4: Disallow Internet Explorer Access

How to Block IE from your SE Site

As most of you are aware SE can be very picky about what browsers are compatible with its Script IE is one that is not always compatible with each version that is released.

Now I’m going to show you how to make you site disabled for IE. In that tutorial I will teach you how to detect internet explorer browser display a message to user that’s trying to open your site with IE and redirect it to download other browser using javascript.

I’m making this tutorial because most of SE4 templates does not support IE browser.

First of all we need to detect the Browser Name

var browser = navigator.appName

This will detect the browser name which I will use in my code. Now let’s check that Browser Name

if(browser == "Microsoft Internet Explorer"){}

This code will run only if Microsoft Internet Explorer is detected. Now let’s create our message

alert("This browser is not supported by our site please download Mozilla Firefox , Opera , Google Chrome or Safari Browser");

You can change that message to whatever browser your template support. Now let’s create the user redirectI will redirectto Mozilla page but u can put opera, safari, firebird its website


You can change that site to supported browser website

Now let’s compile all codes in one code

<!--Block IE Access-->
<script type="text/javascript">
var browser = navigator.appName
if(browser == "Microsoft Internet Explorer"){
alert("This browser is not supported by our site please download Mozilla Firefox , Opera , Google Chrome or Safari Browser");


How to use that code you will ask. It’s easy to use you just need to openapplication\modules\Core\layouts\scripts\default.tpl find

<body id=”global_page_<?php echo $identity ?>”> and paste the code below that line.

How the code works. When user trying to access to your site using IE the message will pops up and notice it to download supported browser and when he press the Ok button that’s hide the message it will be redirect to mozilla official website.

Looking for quality SocialEngine Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , | Posted under 3rd Party Software, SocialEngine | RSS 2.0

Author Spotlight

Andrew Cross

Hi, I'm Andrew. A am a 26, ICT Administrator which offers support to company's around the South Wales Area. I have created a few social sites for myself and other company's. So far 2 out of 3 have been successful using the powerful SocialEngine Script. I continue to try and help the community of SocialEngine by giving Support and Technical Help where possible.

Leave a Reply

Your email address will not be published. Required fields are marked *