cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [kinda OT] browser capabilities database
Date Thu, 19 Oct 2000 11:46:11 GMT
Donald Ball wrote:
> 
> hi guys. we're getting ready to launch our new corporate site, served by
> cocoon naturally, with both HTML and a DHTML skins. i've been tasked with
> the tricky problem of choosing the optimal skin for each user. my initial
> thought was to do client-side javascript detection, by testing to see if
> either document.layers or document.all exist and setting a cookie - not a
> perfect test, but a pretty good one. unfortunately, that approach only
> works if users enter the site via the splash page with the javascript, and
> if they allow me to set cookies.
> 
> my next thought was to check the browser's user agent string against a
> capabilities database. unfortunately, i'm not aware of any such database
> that's open and maintained. php has support for a browscap.ini file, but
> they don't maintain it apparantly. you can download one sort of for free
> from a company, cyscape, but it's many months old, incomplete, and had
> some weird license restrictions. cyscape _does_, however have a javabean
> component called browserhawk which can tell you all sorts of information
> about a browser's capabilities, given an HttpServletRequest. pretty nifty,
> works well with all of the browsers i've tried, but it's not open, and
> it's not exactly cheap. (interestingly enough, it comes with an obfuscated
> version of ibm's xml4j parser - hope they licensed it legitimately!)
> 
> i'm kind of torn. on the one hand, it's a great little component and it's
> got a comprehensive database (much better than their free browscap.ini
> file). on the other hand, it boggles my mind that there is no open browser
> capabilities database out there. am i missing one, is there in fact
> something good out there? if not, two questions:
> 
> 1. would anyone be interested in helping start such a database and a set
> of libraries to access it?

I won't have to time to help directly on this, but this is a great
idea... for sure we need such a tool and I know a couple of persons that
can tell you if a particular tag or javascript hack works on netscape
4.07 on macos rather than ie5.01 on win2k.
 
> 2. will it be fairly straightforward to use a browser capabilities library
> (browserhawk or something else) to do flow control in the c2 sitemap?

are you kidding? of course :)

> (e.g. apply this stylesheet if the browser supports DHTML, otherwise apply
> this one)

how about something like this 

 <select type="browser-lib">
  <when test="supports javascript 1.2">
   <transform src="dhtml-stylesheet.xsl"/>
  </when>
  <otherwise>
   <transform src="html-stylesheet.xsl"/>
  </otherwise>
 </select>

and in the future when CC/PP will be in place we could even do things
like

 <select type="browser-lib">
  <when test="screen greater than 800x600 and accepts SVG">
   <transform src="dhtml-stylesheet.xsl"/>
  </when>
  <otherwise>
   <transform src="html-stylesheet.xsl"/>
  </otherwise>
 </select>

> thanks. i'm looking forward to apachecon so i can get a sitemap/c2 brain
> dump from those of you who've been working so hard on it.

Yep, looking forward for that as well :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message