How to block IE from opening the website?

Asked

Viewed 54 times

0

I have been asked to block access to a particular website whenever it is run by Internet Explorer (regardless of the version).

I’ve been doing some research and testing and I haven’t been able to succeed.

I appreciate your help.

  • 1

    I didn’t get it straight, you want if the guy is in IE and try to enter a website appears an Alert for example? Or that for those who access from IE the site appears a message or with some other type of content? Could give more details

  • @hugocsl, yes... I want when the user accesses through IE, to be shown a div, for example, with blockUI. But the problem isn’t showing the div, it’s really knowing when the user is accessing by IE...

  • 1

    @Lipespry, I don’t think it’s the same doubt...

  • @Filipemartins proposed the duplicate because the answer there addresses enough to answer your question. But it’s worth! ;)

1 answer

1


<script>
    const isInternetExplorer = navigator.userAgent.indexOf('MSIE') > -1

    if (isInternetExplorer) {
        // sua ação (redirecionar usuario para outra pagina, etc.)
    }
</script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.