4 ms·
> if it's just the display of things I would probably go with a warning message Thanks, that's what I was thinking. Is there a standard way to detect whether t
by pansa2 5y ago
> if it's just the display of things I would probably go with a warning message
Thanks, that's what I was thinking. Is there a standard way to detect whether to show the warning message based on which browser is being used?
- seumars 5y agoThere are lot of snippets out there, the most common way would be to target the window.navigator.userAgent, something like: function isIE() { return /Trident\/|MSIE/.test(window.navigator.userAgent); }
- unilynx 5y agoKeep in mind that the code has to compile for checks to work. Eg a ‘let’ in the same script block will break the isIE check too and it’s easy to miss that someone broke it. How often does the ie11 code get tested on ie11.. Best to keep the IE 11 warning code in a separate (nomodule?) script file