<script> var ISOLDIE = false; </script>
Then later, when you want to draw a line to support older versions of IE in your code:
<script> if(ISOLDIE) { alert("Your browser currently does not support this feature. Please upgrade."); window.location = 'http://google.com/chrome'; } </script>
It is generally not recommended to completely remove IE8 support, so I think the above solution is a good compromise, because you can add it to the components of your website / web application, which is simply impossible to do to support IE8, but then you could (possibly) still supporting IE8 in other areas of your site.
source share