Display message for old browsers

Hello people,

So as most of us know internet explorer doesn’t support a lot of the ‘modern’ code and displays a lot of websites incorrectly. I don’t have a lot of visitors using internet explorer but it does occur and I’d like to display a message to these users.

So the question is: How do I display a message/pop-up for people using internet explorer only?

Ideally I’d like to simply have a div block’s display values change if internet explorer = true.

Cheers,
Emil S

1 Like

According to javascript - Internet Explorer 11 detection - Stack Overflow,

if(navigator.userAgent.indexOf('MSIE')!==-1 ||
    navigator.appVersion.indexOf('Trident/') > 0)
{
    // do something here ...
}

For anyone reading this looking for a solution:

<script type="text/javascript">
    if(navigator.appName.indexOf("Internet Explorer")!=-1 || navigator.userAgent.match(/Trident.*rv[ :]*11\./))
    {
       //This user uses Internet Explorer
       window.location = "https://www.yourlinkhere.com";
    }
    </script>