Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23277 invoked from network); 3 Dec 2015 12:44:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Dec 2015 12:44:27 -0000 Authentication-Results: pb1.pair.com header.from=martin.keckeis1@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=martin.keckeis1@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: martin.keckeis1@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-lb0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:33921] helo=mail-lb0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/D3-02069-92930665 for ; Thu, 03 Dec 2015 07:44:25 -0500 Received: by lbbcs9 with SMTP id cs9so817052lbb.1 for ; Thu, 03 Dec 2015 04:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZsQD3Xy6p+SGu2D/J19WNxfVqHE61TSc74D1jg/nFVM=; b=ttsXnnaoohQC9TZmGrj6y0wEqIJ9BSxEbXDEXfKGcYkrQBMyP+rLd88kMc7cmP70Z3 m/VxUHBe1omPc79Heaj4+B0Hdt9MLCf8LsYI3SoBShJyBjHYkidEUtDWPu3qNmUxXSgW I1M68HH+lfI0I8RFKCGDFMCqtFrUaxWwOrCLL+2RuRDKIBfnZQZlLSLlUe6rbe+iURKE STlOUjaO9n+c2SWSd4EUk3+9Fz51WhY3tSprhGiF9O4izUOsaftQJwo32Za4SvUwxV+t BzBnisYeoZYn2kfTz54t+cTVekeO6G9PidxFQjHgZj4Wj3Mhs90ZqMs1M+pZOS7/pCMP Wymw== MIME-Version: 1.0 X-Received: by 10.112.39.5 with SMTP id l5mr5433562lbk.101.1449146662053; Thu, 03 Dec 2015 04:44:22 -0800 (PST) Received: by 10.25.21.27 with HTTP; Thu, 3 Dec 2015 04:44:22 -0800 (PST) In-Reply-To: References: Date: Thu, 3 Dec 2015 13:44:22 +0100 Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11349ed204effd0525fdc0de Subject: Re: [PHP-DEV] Re: Remove get_browser() from core From: martin.keckeis1@gmail.com (Martin Keckeis) --001a11349ed204effd0525fdc0de Content-Type: text/plain; charset=UTF-8 2015-12-02 21:02 GMT+01:00 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/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > User agent sniffing was sadly missused to detect e.g. if it's a mobile device and redirect to a mobile page -> which is wrong right. But user agent sniffing is still a good information source for different things: - statistics / analytics - cross selling - ... But that's not needed in a language core anyway :-) --001a11349ed204effd0525fdc0de--