we want to stop the support for IE8, in order to do that we need to find the browser and version that the client is using (we can do it in client side using navigator.userAgent
or in server side [jsp] using the User-Agent
header that the client sends with the request).
The problem is that we are forcing the browser to render the pages with the IE8 engine (document mode 8) using the metadata: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
, so the user will act like an IE 8 browser.
Is there anyway we can find the actual IE version, ignoring the document mode (compatibility mode)?
Yes.We can find using JQuery or using Java Script.
To find in Java Script we write :
If you want to use Jquery then we can simply use:
Note:If you are using Jquery version 1.9 or greater than that then you have to include jquery-migrate plugin also. Happy Coding!!!