cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject RE: stylesheet switching on browser version
Date Tue, 22 Aug 2000 13:55:57 GMT
> best i've come up with so far is to do detect DHTML support in javascript 
> and set a cookie (for DHTML support) or not. then i'll mess with the
> <?xml-stylesheet?> PI either in a producer, a processor, or an xsp page, 
> based on the presence or absence of said cookie.
>
> probably i'll override ProducerFromFile since i want to automatically add 
> several PIs to all of the documents on this site and i can't be messing
> around with cocoon2 in production yet.
>
> - donald
>


Wouldn't be easier to come up with more specific User-Agent  
cocoon.properties settings so that you're not just determining if the  
browser is Netscape but you're determining that it's Netscape 2.0.2 which  
supports JavaScript v1.0 or IE 4.5 which supports JavaScript 1.2, etc, etc.  


There are really only 2 web browsers that support DHTML, explorer and  
netscape and each version in turn supports different versions of DHTML and  
supports them differently (are you sure you want to use DHTML :-)).   I  
would suggest a fallback approach to the PI's...  If everyone could do a  
little test with their browsers so we would know what the headers are also  
what version of javascript is supported it would be much easier to  
determine what javascript code would/wouldn't work with each browser.

Mike

Mime
View raw message