Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Device Detection for IE in compatibility mode #5487

Closed
cconard opened this issue Apr 18, 2016 · 1 comment
Closed

Client Device Detection for IE in compatibility mode #5487

cconard opened this issue Apr 18, 2016 · 1 comment

Comments

@cconard
Copy link

cconard commented Apr 18, 2016

We wanted to track MS IE in compatibility mode for one of the sites we track with Piwik. The client has IE set to force compatibility mode (IE7 emulation) for IE 8, 9, and 10. The best solution I found was changing the browsers.yml file location at device-detector/regexes/client. I changed the file to track IE 8 in compatibility mode as IE 7.8, IE 9 as 7.9, and IE 10 as 7.10. The change is easy to track, as the User Agent reports IE7, but different versions of the Trident engine. The blocks are inserted BEFORE the IE 8 check.

Here are the changes I made:

-regex: 'MSIE 7._Trident/4.0'
name: 'Internet Explorer'
version: 7.8
engine:
default: 'Trident'
-regex: 'MSIE 7._Trident/5.0'
name: 'Internet Explorer'
version: 7.9
engine:
default: 'Trident'
-regex: 'MSIE 7.*Trident/6.0'
name: 'Internet Explorer'
version: 7.10
engine:
default: 'Trident'

With the support and approval of Piwik and the community, is it possible to include the changes in future versions of Piwik (which I can do with a pull request)? Or at the very least, as an optional set of browser checks (requiring additional coding to load the checks)?

Any suggestions of other methods to track IE in compatibility mode are greatly appreciated.

@coderintherye
Copy link

Maybe this library could add in something like the following which is how we detect it:

          if ($client['browser'] == 'IE') {
              if (isset($client['renderingengine_version']) && isset($client['version'])) {
                  if ($client['renderingengine_version'] < $client['version']) {
                      $ie_compatibility_mode = true;
                  }
              }
          }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants