RTL.fr detects a version number for Firefox and recommends to upgrade to Chrome

RESOLVED WORKSFORME

Status

Tech Evangelism
Mobile
RESOLVED WORKSFORME
3 years ago
3 years ago

People

(Reporter: karlcow, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mobile-compat-form] [country-fr] [clientsniff] [contactready], URL)

(Reporter)

Description

3 years ago
Site: http://www.rtl.fr/
RTL.fr detects a version number for Firefox and recommends to upgrade to Chrome

:: Steps To Reproduce

1. Go to http://www.rtl.fr/ with Firefox OS or Firefox Android with a version < 20.


:: Expected Result

to browse the Web site without issues

:: Actual Result

There's a message recommending the user to upgrade to Chrome Mobile when it is not necessary.

:: Additional Information

Software Version: 18
Device Information: Flame
Reporter's User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0
(Reporter)

Comment 1

3 years ago
There are basically two issues:

1. recommending to upgrade to Chrome instead of a better version of the current browser of the user
2. The upgrade seems to not be relevant wrt to the version number.


15:19:50.744 bowser.version
15:19:50.746 "18.1"
15:19:59.726 bowser.mobile
15:19:59.729 true
15:20:18.723 bowser.firefoxos
15:20:18.726 true



So the site is using a detection system for browser: Bowser (which is working well as we can see above).

/*!
  * Bowser - a browser detector
  * https://github.com/ded/bowser
  * MIT License | (c) Dustin Diaz 2014
  */
!function (e, t) {
    typeof module != 'undefined' && module.exports ? module.exports.browser = t()  : typeof define == 'function' ? define(t)  : this[e] = t()
}('bowser', function () {
    function t(t) {
        function n(e) {
            var n = t.match(e);
            return n && n.length > 1 && n[1] || ''
        }
        var r = n(/(ipod|iphone|ipad)/i) .toLowerCase(),
        i = /like android/i.test(t),
        s = !i && /android/i.test(t),
        o = n(/version\/(\d+(\.\d+)?)/i),
        u = /tablet/i.test(t),
        a = !u && /[^-]mobi/i.test(t),
        f;
        /opera|opr/i.test(t) ? f = {
            name: 'Opera',
            opera: e,
            version: o || n(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)
        }
         : /windows phone/i.test(t) ? f = {
            name: 'Windows Phone',
            windowsphone: e,
            msie: e,
            version: n(/iemobile\/(\d+(\.\d+)?)/i)
        }
         : /msie|trident/i.test(t) ? f = {
            name: 'Internet Explorer',
            msie: e,
            version: n(/(?:msie |rv:)(\d+(\.\d+)?)/i)
        }
         : /chrome|crios|crmo/i.test(t) ? f = {
            name: 'Chrome',
            chrome: e,
            version: n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
        }
         : r ? (f = {
            name: r == 'iphone' ? 'iPhone' : r == 'ipad' ? 'iPad' : 'iPod'
        }, o && (f.version = o))  : /sailfish/i.test(t) ? f = {
            name: 'Sailfish',
            sailfish: e,
            version: n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
        }
         : /seamonkey\//i.test(t) ? f = {
            name: 'SeaMonkey',
            seamonkey: e,
            version: n(/seamonkey\/(\d+(\.\d+)?)/i)
        }
         : /firefox|iceweasel/i.test(t) ? (f = {
            name: 'Firefox',
            firefox: e,
            version: n(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)
        }, /\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t) && (f.firefoxos = e))  : /silk/i.test(t) ? f = {
            name: 'Amazon Silk',
            silk: e,
            version: n(/silk\/(\d+(\.\d+)?)/i)
        }
         : s ? f = {
            name: 'Android',
            version: o
        }
         : /phantom/i.test(t) ? f = {
            name: 'PhantomJS',
            phantom: e,
            version: n(/phantomjs\/(\d+(\.\d+)?)/i)
        }
         : /blackberry|\bbb\d+/i.test(t) || /rim\stablet/i.test(t) ? f = {
            name: 'BlackBerry',
            blackberry: e,
            version: o || n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
        }
         : /(web|hpw)os/i.test(t) ? (f = {
            name: 'WebOS',
            webos: e,
            version: o || n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
        }, /touchpad\//i.test(t) && (f.touchpad = e))  : /bada/i.test(t) ? f = {
            name: 'Bada',
            bada: e,
            version: n(/dolfin\/(\d+(\.\d+)?)/i)
        }
         : /tizen/i.test(t) ? f = {
            name: 'Tizen',
            tizen: e,
            version: n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || o
        }
         : /safari/i.test(t) ? f = {
            name: 'Safari',
            safari: e,
            version: o
        }
         : f = {
        },
        /(apple)?webkit/i.test(t) ? (f.name = f.name || 'Webkit', f.webkit = e, !f.version && o && (f.version = o))  : !f.opera && /gecko\//i.test(t) && (f.name = f.name || 'Gecko', f.gecko = e, f.version = f.version || n(/gecko\/(\d+(\.\d+)?)/i)),
        s || f.silk ? f.android = e : r && (f[r] = e, f.ios = e);
        var l = '';
        r ? (l = n(/os (\d+([_\s]\d+)*) like mac os x/i), l = l.replace(/[_\s]/g, '.'))  : s ? l = n(/android[ \/-](\d+(\.\d+)*)/i)  : f.windowsphone ? l = n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i)  : f.webos ? l = n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i)  : f.blackberry ? l = n(/rim\stablet\sos\s(\d+(\.\d+)*)/i)  : f.bada ? l = n(/bada\/(\d+(\.\d+)*)/i)  : f.tizen && (l = n(/tizen[\/\s](\d+(\.\d+)*)/i)),
        l && (f.osversion = l);
        var c = l.split('.') [0];
        if (u || r == 'ipad' || s && (c == 3 || c == 4 && !a) || f.silk) f.tablet = e;
         else if (a || r == 'iphone' || r == 'ipod' || s || f.blackberry || f.webos || f.bada) f.mobile = e;
        return f.msie && f.version >= 10 || f.chrome && f.version >= 20 || f.firefox && f.version >= 20 || f.safari && f.version >= 6 || f.opera && f.version >= 10 || f.ios && f.osversion && f.osversion.split('.') [0] >= 6 ? f.a = e : f.msie && f.version < 10 || f.chrome && f.version < 20 || f.firefox && f.version < 20 || f.safari && f.version < 6 || f.opera && f.version < 10 || f.ios && f.osversion && f.osversion.split('.') [0] < 6 ? f.c = e : f.x = e,
        f
    }
    var e = !0,
    n = t(typeof navigator != 'undefined' ? navigator.userAgent : '');
    return n._detect = t,
    n
});



Then it is used here.

!function () {
    var a = function () {
        if (!bowser || Common.uaGgPageSpeed) return !1;
        if (bowser.android && (bowser.version <= 30 || !browser.chrome)) {
            var a = 'Votre navigateur n\'est pas à jour ou n\'est pas supporté',
            b = 'Pour une meilleure expérience sur android, utilisez le navigateur suivant dans sa version la plus recente :',
            c = '<a class="link" href="https://play.google.com/store/apps/details?id=com.android.chrome&hl=fr" title="Télécharger Google Chrome" target="_blank"><img class="img" src="' + Common.staticRoot + 'img/deprecated/chrome.png" width="100" height="100" alt="Google Chrome" title="Télécharger Google Chrome" /><span class="name">Google Chrome</span><span class="dl th05">télécharger</span></a>';
            return BrowserAlert.init(a, b, c),
            !1
        }
        return bowser.msie && bowser.version <= 9 ? (BrowserAlert.init(), !1)  : bowser.safari && bowser.version <= 5.1 ? (BrowserAlert.init(), !1)  : bowser.firefox && bowser.version <= 25 ? (BrowserAlert.init(), !1)  : bowser.opera && bowser.version <= 21 ? (BrowserAlert.init(), !1)  : bowser.chrome && bowser.version <= 30 ? (BrowserAlert.init(), !1)  : void 0
    };
    a()
}(window, document, BrowserDetection);
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: Other → ARM
Whiteboard: [mobile-compat-form] → [mobile-compat-form] [country-fr] [clientsniff] [contactready]
(Reporter)

Comment 2

3 years ago
This is working for me.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.