Enqueue Styles and Scripts per Browser in WordPress

We know that all browsers are not created equal. WordPress has some best practices about including scripts/styles in your theme/plugin, but what about those browser issues and fallbacks that you don't want included in 'modern' browsers? WordPress actually has some nice built in browser detection flags we can use to conditionally include files.

Embedded Link

Conditionally Enqueue Script/Styles By Browser
Currently WordPress's wp_enqueue_script() or wp_enqueue_style() does not accept extra data to add HTML conditional markup (see Ticket #16024). For example, using wp_enqueue_script(), you cannot output…

2 thoughts on “Enqueue Styles and Scripts per Browser in WordPress

  1. Hi there, I do think your website could be
    having internet browser compatibility problems. When I take a look at your web site in Safari, it looks fine however
    when opening in IE, it has some overlapping issues. I merely wanted to give you a quick heads
    up! Aside from that, wonderful site!

    1. Thanks for the heads up, no offense, but at this point in time I’m not very concerned with internet exploder. It’s a small percentage on my site and as this is my personal site and playground I don’t focus on old browsers since I spend many hours dealing with it for work already.

Comments are closed.