[Typo3-dev] Browser detection bug - update

Karsten Dambekalns k.dambekalns at fishfarm.de
Tue May 11 12:37:45 CEST 2004


Hi Kasper, folks,

On 2004-05-11, Kasper Skårhøj <kasper at typo3.com> wrote:
> Hi Folks.
>
> I just fixed the browser detection bug. I simply rolled back to the
> previous state of the code which had worked for years.

Seems ok.

> before doing that I spend a lot of time investigating browser strings.
> My intension was to beef up the detection to support all kind of new
> browsers.

Understandable.

> Eventually I gave up. Such a detection script would be HUGE.

Well, it is possible - we have something that works very well and is
not too much code. But it admittedly took us much time to develop
this, as it needed tweaking constantly...

> It wouldn't even be backwards compatible because for a long time TYPO3
> has reported Mozilla/Netscape/Firebird/Firefox all as "netscape". Change
> that to four different strings would be backwards incompatible. That

What we have is not only a *browser* detection, but a *DOM* detection
as well. This makes it possible to detect a DOM compliant browser,
which then can be used with 'standard code for standard behaviour'.

> would just break sites again - even if the detection is more correct.
> And what about Opera? When it identifies itself as MSIE, should we see
> it as MSIE OR as Opera?

This is another issues, that is partly solved by looking for DOM
compliancy rather than a browser, paired with knowing what to do with
Opera to make it work regardless of it's mimicked behaviour. :)

> It's a jungle and I just don't care anymore. In particular because the
> trend is that browser detection is  becoming less important with
> standards compliance more widely used.

True. And what a relief!

This definitely makes this less important for TYPO3, and if I nowadays
really need to detect the browser, it will be for rather specialized
stuff - then I can do my own detection outside of TYPO3 just
fine. Just tell me if you like to have our detection code anyway, I'll
tell my partner to send it to you then.

Karsten




More information about the TYPO3-dev mailing list