[TYPO3-dev] Caring for t3lib_utility_Client

Chris Müller mueller at cyperfection.de
Mon Apr 26 08:43:34 CEST 2010


Hi,

there is already a php function which gives you the correct browser 
information:

http://de3.php.net/manual/de/function.get-browser.php

One drawback: you have to get and update a "browscap.ini" and configure 
it in php.ini.

But perhaps this file can be used to build an own method which relies on 
the browscap.ini. And the browscap.ini can be delivered and updated with 
a core update. So you are up to date to the new browser versions and 
don't have to take care about a new browser or version in your code.

Regards,
Chris.

Am 23.04.2010 15:52, schrieb Francois Suter:
> Hi all,
>
> While working on the documentation I stumbled over the TypoScript
> condition "browser". The list of client looked totally outdated so I
> took a peek into the source code to see where it came from. That led me
> to class "t3lib_utility_Client" and more to the point to the method
> called "getBrowserInfo".
>
> The PHPdoc states the following about this method: "Generates an array
> with abstracted browser information".
>
> Taking some real-world examples, this information seems a bit too
> abstracted for me. Indeed whether you use Firefox 3.6, Safari 4 or
> Chrome 5, you'll get the following result:
>
> - browser: netscape
> - version: 5
>
> This doesn't seem to make a lot of sense. Sure all these browsers send
> back "Mozilla/5.0" in their user agent string, but I would expect a
> finer difference in the result. Shouldn't it really return the browser's
> type (i.e. "firefox", "safari" and "chrome")?
>
> Furthermore the class refers to some really old stuff, some of which I
> even had to google (example: "AvantGo", which doesn't even exist
> anymore...).
>
> And further down there's getDeviceType(), which looks just as outdated,
> to a point where one wonders whether it really still is useful or not.
>
> What should we do with this?
>
> Cheers
>





More information about the TYPO3-dev mailing list