I use the code below to detect browser version to advice user use higher version IE. But it works in IE11 not correctly.
// forbid ie10 below visit
if(navigator.userAgent.match(/msie\s[5-9]/i))
{
... // show a advice page to change ie version
}
I find if the web publish to server, user will see the ie version change advice.
User agent string : Internet Explorer 11 (Default)
Document mode 5(Default)
When I change Document mode to 11, the web work well.
I also use the code below in html head, but it doesn't work.
<meta http-equiv="X-UA-Compatible" content="IE=11" />