The method for identifying the browser's JavaScript Engine is available for both PC and mobile browsers. In fact, the implementation principle is the following JavaScript code. If you are interested, you can refer to the answer from StackOverflow to open this webpage.
The QR code is the URL. The webpage contains statistics on the access volume. The author wants to know how many people are useful. We recommend that you respect originality and do not copy this webpage.
Available for both PC and mobile browsers.
The principle is this section of js:
The Code is as follows:
Window. onload = function (){
Var v8string = 'function % 20 javaEnabled % 28% 29% 20% 7B % 20% 5 Bnative % 20 code % 5D % 20% 7D ';
If (window. devicePixelRatio) // If WebKit browser
{
If (escape (navigator. javaEnabled. toString () === v8string)
{
Display ('v8 detected ');
}
Else
{
Display ('jsc detected ');
}
}
Else {
Display ("Not a WebKit browser ");
}
Function display (msg ){
Var p = document. createElement ('P ');
P. innerHTML = msg;
Document. body. appendChild (p );
}
};
First, check the devicePixelRatio attribute that is unique to WebKit, and then check the implementation of the javaEnabled function that is unique to v8.