Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89523 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24332 invoked from network); 2 Dec 2015 20:02:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2015 20:02:53 -0000 X-Host-Fingerprint: 178.62.40.5 ajf.me Received: from [178.62.40.5] ([178.62.40.5:18053] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/31-02398-B6E4F565 for ; Wed, 02 Dec 2015 15:02:52 -0500 Message-ID: To: internals@lists.php.net References: Date: Wed, 2 Dec 2015 20:02:48 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 178.62.40.5 Subject: Re: Remove get_browser() from core From: ajf@ajf.me (Andrea Faulds) Hi Martin, Martin Keckeis wrote: > i think it's time to deprecate the function get_browser(). > > The reason is simple: Since the browscap.ini file has grown a lot this > function does need way too much time, see here for example > http://stackoverflow.com/questions/12067641/get-browser-slowing-down-page-load-any-alternative > > The underlying browscap.ini file is still a very resource to use and there > are very good official packages out there to use it > https://packagist.org/packages/browscap/browscap-php > > I also compared the browscap.ini file to other UserAgent parsers around and > it looks still good > http://thadafinser.github.io/UserAgentParserComparison/results/index.html I'd also support removing get_browser(), but for a different reason: it encourages user agent sniffing, which is a bad practice that has led to the mess that is modern User-Agent headers. The web is an open platform which degrades gracefully, where you can detect if browsers support features you need and adapt accordingly. Detecting specific browsers is harmful to competition and not future-proof. Thanks. -- Andrea Faulds http://ajf.me/