1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disable a file ...tricky?

Discussion in 'HTML, Graphics & Programming' started by chris_r, 29 Sep 2009.

  1. chris_r

    Mobster

    Joined: 1 Dec 2003

    Posts: 2,812

    Location: Liverpool

    Hello,

    On the site i am building it has certain features that work awesome in Firefox but when in IE....forget it!!

    Anyway, is there a way to disable a certain file if the user is on the site using IE?

    So i need footer_chat.php disabled if you use IE, is this possible?

    thanks :)
     
  2. Russinating

    Capodecina

    Joined: 27 Dec 2005

    Posts: 16,367

    Location: Bristol

    Two ways: use PHP to detect the user's browser ($_SERVER['HTTP_USER_AGENT']) and then include footer_chat.php depending on that, or put the content of footer_chat.php inside a DIV with the display:none; attribute in an IE-specific css.

    PHP would be better but slightly more tricky. Both are pretty easy though.
     
  3. chris_r

    Mobster

    Joined: 1 Dec 2003

    Posts: 2,812

    Location: Liverpool

    Hi,

    Speedy responce, could you guide me on this?

    PHP way seems the better option as the file itself is quite large in code terms.

    Much appreciated.
     
  4. Russinating

    Capodecina

    Joined: 27 Dec 2005

    Posts: 16,367

    Location: Bristol

    I've never used $_SERVER['HTTP_USER_AGENT'] extensively so you're best just looking here: http://www.google.co.uk/search?q=$_SERVER['HTTP_USER_AGENT']
     
  5. Pho

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 9,160

    Location: Derbyshire

    Might be a good idea to look into fixing it in IE, considering lots of people use it. Is it just formatting/CSS issues?
     
  6. chris_r

    Mobster

    Joined: 1 Dec 2003

    Posts: 2,812

    Location: Liverpool

    Hi,

    Yeah, i cant actually fix it though ive tried a few weeks and also had a few people looking at it.

    The sites still got a few bugs an a few easy things that need changing but this is the biggest problemo!
     
  7. djkav

    Mobster

    Joined: 28 Aug 2006

    Posts: 2,979

    I would do like Russinating said and use the HTTP_USER_AGENT in the sever variables to detect a users browser.

    True, you should atempt to fix the source of the problem. If you cant, then that is your next best bet.
     
  8. chris_r

    Mobster

    Joined: 1 Dec 2003

    Posts: 2,812

    Location: Liverpool

    I'd love to fix it as the features it give are user chat (like facebook friend chat)

    However, i just cant :/
     
  9. Pho

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 9,160

    Location: Derbyshire

    Any chance you could post it up? I'm sure someone will be able to help.