Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Jackson 11 posts 31 karma points
    Aug 24, 2015 @ 09:38
    Simon Jackson
    0

    Notification to users for unsupported browsers?

    Hi All,

    Very new to Umbraco, apologies if I'm posting this in the wrong place.

    Does anyone know of a plugin that will display a message to a user if they navigate to a website that's with a browser that the site has not been designed for.

    For example, I want to tell IE 8 users and below that the site may not work and to update their browsers.

    Kind regards Si

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 24, 2015 @ 09:54
    Lee Kelleher
    0

    Hi Simon,

    For IE specifically you can use conditional-comments to target specific versions of IE.

    <!--[if lte IE 8]>
        <div class="ie8">Special instructions for IE 8 (and lower) here</div>
    <![endif]-->
    

    See this article for details about it: http://www.quirksmode.org/css/condcom.html

    If you wanted to target other browsers, then you could start looking at using Modernizr (JavaScript library): http://modernizr.com/

    This will add a bunch of classes to the root <html> tag, when you can use CSS to display/hide features, notifications, etc.

    Cheers,
    - Lee

  • Simon Jackson 11 posts 31 karma points
    Aug 24, 2015 @ 10:37
    Simon Jackson
    0

    Hi Lee,

    Thanks for the quick answer, I had no idea conditional-comments existed.

    Modernizer seems interesting, but a little stale from the news feed (last updated Apr 2013).

    From this recommendation, I'm inferring that perhaps I should be thinking more about using a JS lib to mitigate the CSS cross browser risk rather than about which browser versions are visiting?

    Many thanks Si

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 24, 2015 @ 10:46
    Lee Kelleher
    0

    I think the Modernizer news section dates are misleading, the source-code itself is still actively developed, (according to their GitHub repo). Although, for the most part it is pretty much "feature complete" :-)

    Browser detection (for specific browsers) is still widely used, there's nothing wrong with doing that.

    The future/modern ideology is to do "feature detection", the thinking is to degrade experiences for older browsers, rather than kick them out the door.

    Of course, this all comes with a cost (in terms of money, time, knowledge and energy) ... which isn't always a luxury when client deadlines are looming ;-)

    Cheers,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft