Reputation: 26969
I need to show a different webpage when i open my website in IE6 and below version.
Need to show fbrowser.html
file when my website opens in IE6 and below versions.
Please suggest!!
Upvotes: 3
Views: 402
Reputation: 30980
According to this answer, you can try somethiing like the following:
<script type="text/javascript">
// <![CDATA[
var BrowserCheck = Class.create({
initialize: function () {
var userAgent = navigator.userAgent.toLowerCase();
this.version = (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1];
this.safari = /webkit/.test(userAgent) && !/chrome/.test(userAgent);
this.opera = /opera/.test(userAgent);
this.msie = /msie/.test(userAgent) && !/opera/.test(userAgent);
this.mozilla = /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent);
this.chrome = /chrome/.test(userAgent);
}
});
// ]]>
</script>
Upvotes: 0
Reputation: 46549
In head:
<!--[if lte IE 6]>
<meta http-equiv="refresh" content="0; url=fbrowser.html">
<![endif]-->
Sorry, no javascript needed.
Upvotes: 4