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.