How effective is the Chrome developer tools user-a

2019-04-09 11:21发布

问题:

The Chrome developer tools have a feature to change the user-agent to spoof servers enabling developers to test applications for other devices and browsers without having to leave the comfort of the Chrome browser on a desktop terminal. I assume that Chrome emulates these other browsers rather than them virtually. How standards compliant is Chrome with regard to JavaScript, CSS, and other technical browser differences? For instance, has anyone done a comprehensive test to determine if the Chrome emulation of Internet Explorer 7 and the actual Internet Explorer 7 render identical pages, pixel for pixel?

回答1:

Chrome does not attempt to emulate other browsers at all when the user agent string is changed.
To verify this assertion, just use Internet Explorer-specific features, such as conditional compilation, conditional comments, ActiveX, VB Script, ... None of these function in Chrome.

If you want to get Chrome to render pages like Internet Explorer, install the IE Tab Chrome extension. An existing installation of Internet Explorer is required though, which implies that non-Windows operating systems such as Linux and Mac are not supported.