body_class() function improperly reporting "Chrome" when viewing in IE (3 posts)

  1. TrevorPolischuk
    Posted 3 years ago #


    I'm currently running into an issue with applying conditional CSS to deal with some quirks in Internet Explorer. Usually, I just use the body_class() function to detect what browser the user is using and then output that into the <body> element. However, I'm running into an issue where in Internet Explorer, it is returning "chrome" instead of "ie" in the DOM.

    Has anyone else ever ran into this issue?

    Link below to see for yourself.


    Thanks in advance.


  2. Pioneer Web Design
    Posted 3 years ago #

    Did you flush WP Super Cache?

    I am seeing:
    <body class="safari" data-twttr-rendered="true">
    In IE10 and latest Chrome

    Try deactivating plugins (a plugin may be also using body class?)

  3. TrevorPolischuk
    Posted 2 years ago #

    Ya that was it. Nice catch. I was using WP-Super Cache but I deactivated it. I'm going to try using W3 Total Cache to see if I run into the same issue.


Topic Closed

This topic has been closed to new replies.

About this Topic