User-Agent String Detection (1107 / 1207 / 1307 / 1407)
AdminStudio 2021 | 21.0 | Application Manager
For this browser compatibility test, the web application contents are scanned for the usage of client-side scripts that use the user-agent string for browser or system detection. Popular JavaScript frameworks (jQuery, jQuery UI, Prototype, MooTools, Cufon) are excluded from this scan.
Caution:Some web applications use the user-agent string for auxiliary purposes—for example, statistical data collection. This test might generate false positives for such web applications.
Test Group/Test Category
• | 1307—Browser Compatibility/Internet Explorer 11 |
• | 1407—Browser Compatibility/Microsoft Edge |
Severity
Warning
Message
This web application contains a script that uses the user-agent string for browser or system detection (File: [FILE_NAME]).
Background
When a web application is accessed, the user-agent string is sent by the browser to the hosting server. This string indicates the browser details, including its name, version number, and running platform. The web server can use this information to provide content that is tailored for this specific browser. Since the user-agent string has been changed in Internet Explorer 11 and later, some web applications using this string might not recognize it and serve incompatible content.
Resolution
The web application should be re-engineered to use feature support detection instead of relying on the user-agent string. Where this is not feasible, the Internet Explorer 11 Compatibility View should be used. It can be triggered by using the meta attribute value X-UA-Compatible.
See Also