Outdated Browser message appears in IE 10-11 with Compatibility Mode
I'm running Internet Explorer 11 with "Display intranet sites in Compatibility View" enabled. It appears that Gitlab is properly setting the X-UA-Compatible
header and meta tag to IE=edge
and Internet Explorer is correctly rendering the page with the newest rendering engine. However, the "GitLab may not work properly because you are using an outdated web browser" message still appears at the top of every page.
It looks like this is because the outdated_browser
method in app/helpers/application_helper.rb
is just looking to see if the browser is Internet Explorer and the version is less than 10. With Compatibility View enabled in modern Internet Explorer, the User-Agent includes both the IE 7 string (MSIE 7.0
) and the newest string (Trident/X.0
). So the method you are using will always think Internet Explorer is version 7, even when using the newest Internet Explorer with Compatibility View enabled.
Looking at the browser gem's code, it looks like the browser.modern_ie?
method should be used instead of browser.ie? && browser.version.to_i < 10
to check for an outdated browser. browser.modern_ie?
should correctly handle legitimately old versions of IE (return false) and modern IE versions running in Compatibility View (return true).