Mobile app version of vmapp.org
Login or Join
YK1175434

: How can I block site visitors using legacy browsers I want my site to block access to visitors that are using outdated browsers such as IE6 and IE7 etc. I am looking for a script that I

@YK1175434

Posted in: #Browsers #BrowserSupport #Javascript

I want my site to block access to visitors that are using outdated browsers such as IE6 and IE7 etc.

I am looking for a script that I can use to block certain browsers accessing my site

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @YK1175434

1 Comments

Sorted by latest first Latest Oldest Best

 

@Miguel251

You can detect older versions of Internet Explorer using the IE Conditional Comments feature. The following snippet when included in a web page will redirect versions older than IE 8 to a separate page -

<!--[if lt IE 8]>
<SCRIPT LANGUAGE="javascript">
location.href="legacy.html";
</SCRIPT>
<![endif]-->


You can also choose to hide the page's content by setting the container tag's display property style to none via JavaScript.

The browser can also be detected through server-side code.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme