Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Detect browser

  1. #1
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default Detect browser

    Is there a script where I can do like

    If Browser is IE6 or Lower then goto a page that says you need to update
    or if browser is ie7+ or Firefox then load the site?

    Thanks

  2. #2
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    4,244
    Tokens
    0

    Latest Awards:

    Default

    JS or PHP.

    If you mean, when you load the page - if it detects it's ie6 then it shows /upgrade.php or whatever?

    There will be one somewhere.
    A collection of forum users' views on obesity
    Quote Originally Posted by mynameisjake View Post
    sounds good
    Quote Originally Posted by Stephen View Post
    Just google it.
    Quote Originally Posted by jesus View Post
    jesus christ
    Quote Originally Posted by Alexicles. View Post
    It will probably soon go away.

  3. #3
    Join Date
    Nov 2006
    Location
    In habbo :)
    Posts
    1,027
    Tokens
    0

    Latest Awards:

    Default

    Yeh, Theres one somewhere.

  4. #4
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    JS or PHP.

    And yeah I mean like that

  5. #5
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Dont do that "/ You will honestly loose a lot of visitors. Make your coding cross browser rather than just blocking them out

  6. #6
    Join Date
    Dec 2006
    Posts
    216
    Tokens
    0

    Default

    Quote Originally Posted by RobbieGray View Post
    Is there a script where I can do like

    If Browser is IE6 or Lower then goto a page that says you need to update
    or if browser is ie7+ or Firefox then load the site?

    Thanks
    I would advise you not to do that as alot of people don't use legal versions of windows which means they can't upgrade to IE 7 and don't want to download a different browser ie. Firefox.


    Need A Free Vbulletin Skin? Either Make One Yourself Or Find My Old Outdated Threads.

  7. #7
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    Well then how do I get ie6 to display http://robbiegray.info/layout properly

  8. #8

    Default

    certainly

    Code:
    <html>
    <script>
    if(navigator.userAgent.indexOf("Firefox") != -1)
    {
       window.location = "browser/firefox.html";
    }
    else if(navigator.userAgent.indexOf("MSIE") != -1)
    {
       window.location = "main.php";
    }
    else if(navigator.userAgent.indexOf("Netscape") != -1)
    {
       window.location = "main.php";
    }
    else
    {
       window.location = "browser/other.html";
    }
    </script>
    </html>


  9. #9
    Join Date
    Oct 2006
    Posts
    1,026
    Tokens
    0

    Latest Awards:

    Default

    Try coding it properly maybe?
    Quote Originally Posted by RobbieGray View Post
    Well then how do I get ie6 to display http://robbiegray.info/layout properly

  10. #10
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Luckyrare View Post
    Dont do that "/ You will honestly loose a lot of visitors. Make your coding cross browser rather than just blocking them out
    Well he ether has to do that, or get of his **** and actualy code his pages properly in the first place "/ (then spend the additional 5 hours adding browser hacks so IE wont **** it up...)

Page 1 of 2 12 LastLast

Posting Permissions

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