Results 1 to 3 of 3

Thread: Browser redirect

  1. #1
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Browser redirect

    http://www.dynamicdrive.com/dynamicindex9/bredirect.htm

    Hello,

    Im trying to use the script because one of the pages on my site isnt loading properly in IE or opera, http://abelloda.co.uk/projects.htm, its only good in firefox (see attatchment).

    I saved the script as redir.htm and put it in my root folder, made an /IE folder with the correct IE settings and changed this bit

    //if NS 6
    //if (browser_type=="Mozilla Firefox"&&browser_version>=5)
    //window.location.replace("http://abelloda.co.uk")
    //if IE 4+

    if (browser_type=="Microsoft Internet Explorer"&&browser_version>=6)
    window.location.replace("http://abelloda.co.uk/IE")
    //if NS4+
    else if (browser_type=="Opera"&&browser_version>=8)
    window.location.replace("http://abelloda.co.uk/IE")
    //Default goto page (NOT NS 4+ and NOT IE 4+)
    else
    window.location="http://abelloda.co.uk"
    Anyone got a quick clue please?

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by abelloda
    Im trying to use the script because one of the pages on my site isnt loading properly in IE or opera, http://abelloda.co.uk/projects.htm, its only good in firefox (see attatchment).
    Then fix the problem. Browser detection is flawed and unreliable.

    To begin the process, start by deleting that Dreamweaver-generated junk.

    • The 'transition' is over: use a Strict document type.
    • Neither style nor script elements should contain SGML comment declarations.
    • Don't specify font sizes in pixels. Use percentages, with body text at 100%.
    • Don't use Verdana.
    • Class names should be semantic.
    • A color property declaration should be paired with an explicit background declaration.
    • Use document structure to identify elements in CSS selectors where possible, rather than excessive use of classes.
    • The language attribute is deprecated for script elements. Only the type attribute is necessary.
    • The blockquote element is not for indenting.
    • Spacer images are abhorrent, and apparently, even the 'inventor' apologised for ever promoting them.
    • That list of links should be marked up as a list.
    • Use margins instead of line breaks and empty paragraphs.
    Mike
    Last edited by mwinter; 03-13-2006 at 02:55 PM.

  3. #3
    Join Date
    Mar 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, Mike

    Quote Originally Posted by mwinter
    Then fix the problem. Browser detection is flawed and unreliable.

    To begin the process, start by deleting that Dreamweaver-generated junk.

    • The 'transition' is over: use a Strict document type.
    • Neither style nor script elements should contain SGML comment declarations.
    • Don't specify font sizes in pixels. Use percentages, with body text at 100%.
    • Don't use Verdana.
    • Class names should be semantic.
    • A color property declaration should be paired with an explicit background declaration.
    • Use document structure to identify elements in CSS selectors where possible, rather than excessive use of classes.
    • The language attribute is deprecated for script elements. Only the type attribute is necessary.
    • The blockquote element is not for intenting.
    • Spacer images are abhorrent, and apparently, even the 'inventor' apologised for ever promoting them.
    • That list of links should be marked up as a list.
    • Use margins instead of line breaks and empty paragraphs.
    Mike

Bookmarks

Posting Permissions

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