Is there a way I can block visitors using Internet Explorer from using my website? I have a site that uses Google Places API and it doesn’t work on IE hence the need.
You would need to know the User-agent of Internet Explorer web browser.
Other thing is to use HTML code inside your <body>...</body>
to hide or inform the users the content if IE lower than 8
or just if IE
like:
<!--[if lt IE 8]> or <!--[if IE]>
<div style='position:absolute;top:0px;left:0px;width:100%;height:100%;background:white;padding-top:50%;text-align:center;'>
<!-- add more styling or split it up in some separate stylesheet-->
This site is currently disabled for IE users...
</div>
<![endif]-->
Moreover, add html5shiv
and respond.min.js
file to your <head>...</head>
like:
<!--[if lt IE 9]>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
And, use Cloudflare Firewall Rules or either add them under the User-Agent blocking tool.
Using Firewall Rules, would be like expression:
(http.user_agent contains "MSIE")
Depending on the IE version:
1 Like
Thanks! Can I apply just the Firewall Rules in Cloudflare without applying the HTML and html5shiv and js codes?
1 Like
Yess.
2 Likes
Thanks!
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.