3

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!!

2

3 Answers 3

4

In head:

<!--[if lte IE 6]>
<meta http-equiv="refresh" content="0; url=fbrowser.html">
<![endif]-->

Sorry, no javascript needed.

Sign up to request clarification or add additional context in comments.

8 Comments

that's interesting - what is doing the parsing and interpretation there?
If i m right it should be <!--[if lte IE 6]>, see missing > in end
@user859955 these are conditional comments, which are used only by IE. Doing it like this hides the content from other browsers.
Yup it is working now. but i need to do it for all my html pages. pasting this code is in all the pages is the only solution fopr this? or is there any way to redirect to the fbrowser.html when the domain name opens? And also it should not only for ie 6, it is for ie6 and lower ie versions
This syntax uses lte which means "less than or equal" so it detects all IE versions 6 and below. Problem solved! But if you want to detect IE earlier than during the page load, you might be better off detecting the browser on the server side. What platform are you using?
|
1

You could consider using http://api.jquery.com/jQuery.browser/

Comments

0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.