Subject: | Incorrect detection of new Opera Browsers (>=15.x) as Chrome |
Newer Opera browsers are icorrectly detected as Chrome.
Testcase: x.pl
Subject: | x.pl |
use strict;
use warnings;
use feature qw(say);
my %ua = (
Opera_1216 =>
'Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.16',
Firefox_24 =>
'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0',
IE_10 =>
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Win64; x64; Trident/6.0)',
Opera_DEV =>
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.8 Safari/537.36 OPR/18.0.1284.5 (Edition Developer)',
Opera_STABLE =>
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36 OPR/17.0.1241.45',
);
use HTML::ParseBrowser;
for my $k ( keys %ua ) {
my $ua = HTML::ParseBrowser->new($ua{$k});
print "\n####### : ", $k, "\n";
print "Browser : ", $ua->name, "\n";
print "Version : ", $ua->v, "\n";
print "OS : ", $ua->os, "\n";
print "Language : ", $ua->language//'', "\n";
}