#923 IE11 detection not always working

7.3
open
nobody
IE11 (1)
1
2015-01-05
2014-04-10
Julien Cyr
No

Detection of IE11 as been added in awtats 7.3. It is working, but the regex is not catching all cases. The regex is detecting "Trident/7.\d; rv:\d.\d.". But, there is multiple token between "trident" and "rv" that can occur.

For example, if IE11 is on a touch device (tablet, AiO/laptop with touchscreen, etc), there is a "TOUCH;" token.

Some examples of UA string not catched by the regex:
Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; TNJB; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; ASJB; ASJB; MAAU; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; MAARJS; rv:11.0) like Gecko

All those cases go to "Mozilla" browser...

I'm not sure about how it should be managed since the tokens are not defined. Maybe something like :

my $regvermsie11      = qr/trident\/7\.\d*\;[^()]*rv:([\d\.]*)/i;

Related

Bugs: #923

Discussion

  • Julien Cyr
    Julien Cyr
    2014-04-10

    Probably a better one will be:

    my $regvermsie11      = qr/trident\/7\.\d*\;([+_ ]|)([\w\.]+\;([+_ ]|))*rv:([\d\.]*)/i;
    

    I added the dot with the \w because I think it can be a token about .NET framework version. (ex.: .NET4.0C)

     
    Last edit: Julien Cyr 2014-04-10
    • I think replacing
      my $regvermsie11 = qr/trident\/7.\d\;([+_ ]|)rv:([\d.])/i;
      into
      my $regvermsie11 = qr/trident\/7.\d\;([a-zA-Z;+_ ]+|)rv:([\d.])/i;

      Is this ok for you ?

      2014-04-10 19:50 GMT+02:00 Julien Cyr juliencyr@users.sf.net:

      Probably a better one will be:

      my $regvermsie11      = qr/trident\/7\.\d*\;([+_ ]|)(\w+\;([+_
      

      ]|))rv:([\d.])/i;


      [bugs:#923] IE11 detection not always working

      Status: open
      Group: 7.3
      Labels: IE11
      Created: Thu Apr 10, 2014 05:38 PM UTC by Julien Cyr
      Last Updated: Thu Apr 10, 2014 05:38 PM UTC
      Owner: nobody

      Detection of IE11 as been added in awtats 7.3. It is working, but the
      regex is not catching all cases. The regex is detecting "Trident/7.\d;
      rv:\d.\d.". But, there is multiple token between "trident" and "rv" that
      can occur.

      For example, if IE11 is on a touch device (tablet, AiO/laptop with
      touchscreen, etc), there is a "TOUCH;" token.

      Some examples of UA string not catched by the regex:
      Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; TNJB; rv:11.0) like Gecko
      Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; ASJB; ASJB; MAAU;
      rv:11.0) like Gecko
      Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; MAARJS; rv:11.0)
      like Gecko

      All those cases go to "Mozilla" browser...

      I'm not sure about how it should be managed since the tokens are not
      defined. Maybe something like :

      my $regvermsie11      = qr/trident\/7\.\d*\;[^()]*rv:([\d\.]*)/i;
      

      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/awstats/bugs/923/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

      --
      Laurent Destailleur (alias Eldy)


      Social networks of my OpenSource projects:
      Dolibarr Google+: https://plus.google.com/+DolibarrOrg/
      Dolibarr Facebook: https://www.facebook.com/dolibarr
      Dolibarr Twitter: http://www.twitter.com/dolibarr
      AWStats Google+: https://plus.google.com/+AWStatsOrgPoject/
      AWStats Facebook: https://www.facebook.com/awstats.org
      AWStats Twitter: http://www.twitter.com/astats_project

       

      Related

      Bugs: #923

  • Julien Cyr
    Julien Cyr
    2014-04-10

    It should be good. It will not catch token like ".NET4.0C", but I was not able to find this token on a IE11 UA string in my last two days of log (about 1GB). So maybe they remove that token for IE11. I didn't find anything in Microsoft documentation, except they suggest to detect only with the Trident version. I don't think it's a good idea since there is other browser (like Maxthon) that can use Trident.

     
  • Upgraded to AWStats 7.3 and can't see any IE 10 or IE 11 browser detections in our intranet environment. Only Msie 9.0 and Msie 7.0. We are running Windows Server 2008 R2 32bit, IIS 7.5 and Perl 5.18. Is there a fix available?

     
  • Fix should be available with 7.4