Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE 6.0+ Browser redirect

    Does anyone know of any javascript that redirect a user to a browser version specific page? My site is only compatible with IE 6.0 or higher so I would need a script that will send users with IT 6.0 or higher to one page, and people using other versions of IE or users with netscape to different pages. Any help would be great.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Can be done without using javascript

    <head>
    <!--[if ! IE 6]>
    <meta http-equiv="Refresh" content="1; URL=nonIE6page.htm">
    <![endif]-->
    </head>

    That will automatically redirect non-IE6 users to the specified page.

    That's called Conditional Comments of IE.

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    That will be treated as one single comment in most non-ie browsers...

    Maybe this?:

    <!--[if ! IE 6]-->
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Just out of curiosity, why is it only compatible with IE6? Currently Mozilla and the other open source browsers have better support of newer technologies such as CSS2.
    OracleGuy

  • #5
    New Coder
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    glenngv: thanks, i will give it a try

    Originally posted by oracleguy
    Just out of curiosity, why is it only compatible with IE6? Currently Mozilla and the other open source browsers have better support of newer technologies such as CSS2.
    Well the thing is, I use iFrames and a multi image background that from what I have tested, only displays perfectly in IE. I have tested it in Netscape and Opera, and everything wasn't aligned correctly. I have yet to try Mozilla because I'm guessing the results of the page will be the same because I created the website using IE.

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Speaking of that, the case is more likely that iew is the one who gets the alignment wrong and the others get it right. Moz and op are both very good at css, while iew has it's deficits in that area.

    Just wondering, what version of nn/ns were you speaking about? Ns6-7 are based on moz while nn1-4 are based on their earlier rendering engine.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #7
    New Coder
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've tried it with both older and earlier versions. And it wouldnt suprise me if IE gets the alignment wrong. The browser really pisses me off but also NS/NN some reason make my computer lag and freeze. Opera and Mozilla I like but since the mass majority of people who visit my site have NS or IE (mostly IE, ,barely anynone that visits it uses Opera or Mozilla), then I just made it so it's displayed correctly with IE.

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Although I don't know what your site is about, only making your site work "correctly" in IE could be the reason you get only a few people using other browsers. I'm not trying to be rude or anything, I just wanted to point it out.
    OracleGuy

  • #9
    New Coder
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't think you are being rude at all. My site isn't anything commercial. It's just a personal site for the most part. I mean it's now anything like "Here is my cat fluffy. Lok at the picture. He is cute." I just decided to start a site that is pretty much nothing but an online journal... my views and beliefs of life, religion, politics, society, etc... and my poetry and paintings and stuff. Nothing serious.

  • #10
    Registered User
    Join Date
    Apr 2003
    Location
    Murmansk, Arctic
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by fallingintoZero
    [...]I use iFrames and a multi image background
    Ooooh! Any chance you've a link? I'd like to take a look!

    I think I've the same ideas: http://arctic.ithium.net/



  • #11
    New Coder
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well as of right now I took the site down to redesign it but it should be back up soon, when it is I could e-mail you the address.

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Originally posted by liorean
    That will be treated as one single comment in most non-ie browsers...

    Maybe this?:

    <!--[if ! IE 6]-->
    Ok, let me correct it...

    <![if !IE 6]>
    <meta http-equiv="Refresh" content="1; URL=nonIE6page.htm">
    <![endif]>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •