Detecting Mozilla based browsers
Sorry, this is perhaps some OT, but perhaps some of you made this... I'm trying to detect (server side) Mozilla+Midas compatible browsers. Since this feature (Midas) is new, finding "Gecko" in the user agent signature doesn't seem to be enough. Any clue ? Does it need a Javascript helper ? Thanks in advance --Gilles
There tons of javascripts available that check for the different browser flavours. Google will be your friend. -aj --On Montag, 31. März 2003 18:48 Uhr +0200 Gilles Lenfant <gilles@pilotsystems.net> wrote:
Sorry, this is perhaps some OT, but perhaps some of you made this...
I'm trying to detect (server side) Mozilla+Midas compatible browsers. Since this feature (Midas) is new, finding "Gecko" in the user agent signature doesn't seem to be enough.
Any clue ? Does it need a Javascript helper ?
Thanks in advance
--Gilles
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
It would be nice to have a script used to identify many types of browsers (plus what features they support). I developed one (at home) that pulls the value from REQUEST.HTTP_USER_AGENT and guesses which one made the request, and returns a special code (ex. 'MSIE', 'Mozilla', 'Konqueror') which you can use in a decision tree from there. Would it be useful for the REQUEST object to have an API for this? Perhaps I'll play around a bit with it. Trouble is, like currancy converters, how do we keep the list up-to-date? An XML-RPC call? For features like Midas...good question. Not being real familiar with it, how do you invocate it in a page? It might not be possible to detect until it is released in the core with say, Mozilla 1.5, and you can know by the version number (unless it's disabled!) Good luck, Eron On Monday March 31 2003 11:48 am, Gilles Lenfant wrote:
Sorry, this is perhaps some OT, but perhaps some of you made this...
I'm trying to detect (server side) Mozilla+Midas compatible browsers. Since this feature (Midas) is new, finding "Gecko" in the user agent signature doesn't seem to be enough.
Any clue ? Does it need a Javascript helper ?
Thanks in advance
--Gilles
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) --- [This E-mail scanned for viruses by Declude Virus]
-- Eron Lloyd Technology Coordinator Lancaster County Library elloyd@lancaster.lib.pa.us Phone: 717-239-2116 Fax: 717-394-3083 --- [This E-mail scanned for viruses by Declude Virus]
Hi, detecting a special user-agent incarnation is usually a waste of time. Instead of trying to detect one of 1423124982739 browsers with different capabilities by their most of the time faked user-agent string, one should focus to silently fall back and check only availability of special attributes in the DOM. IF you want to use a special DOM object, just look wether it is defined and choose your action based on this. This way you silently support all browsers which try to be the same instead of making an endless growing list. I personally HATE sites which tell me I would have an unsuported browser only because their sucking scripts fail. Pretty please stop this sillyness! user-agent string is only ment informative and is by no way relieable! There exist several techniques to fall-back with CSS and fall back with scripts. You should also provide usefull information if scripting is disabled. Regards Tino Wildenhain Eron Lloyd wrote:
It would be nice to have a script used to identify many types of browsers (plus what features they support). I developed one (at home) that pulls the value from REQUEST.HTTP_USER_AGENT and guesses which one made the request, and returns a special code (ex. 'MSIE', 'Mozilla', 'Konqueror') which you can use in a decision tree from there. Would it be useful for the REQUEST object to have an API for this? Perhaps I'll play around a bit with it. Trouble is, like currancy converters, how do we keep the list up-to-date? An XML-RPC call? For features like Midas...good question. Not being real familiar with it, how do you invocate it in a page? It might not be possible to detect until it is released in the core with say, Mozilla 1.5, and you can know by the version number (unless it's disabled!)
I agree, and wish that if browser developers *are* going to continue adding whiz-bang stuff to their products, that there is some way of introspecting this information, by expanding the user agent into some kind of standardized, meaningful code. And yes, browser blocking should be a no-no. Eron On Monday March 31 2003 12:30 pm, Tino Wildenhain wrote:
Hi,
detecting a special user-agent incarnation is usually a waste of time. Instead of trying to detect one of 1423124982739 browsers with different capabilities by their most of the time faked user-agent string, one should focus to silently fall back and check only availability of special attributes in the DOM.
IF you want to use a special DOM object, just look wether it is defined and choose your action based on this.
This way you silently support all browsers which try to be the same instead of making an endless growing list.
I personally HATE sites which tell me I would have an unsuported browser only because their sucking scripts fail.
Pretty please stop this sillyness!
user-agent string is only ment informative and is by no way relieable!
There exist several techniques to fall-back with CSS and fall back with scripts. You should also provide usefull information if scripting is disabled.
Regards Tino Wildenhain
Eron Lloyd wrote:
It would be nice to have a script used to identify many types of browsers (plus what features they support). I developed one (at home) that pulls the value from REQUEST.HTTP_USER_AGENT and guesses which one made the request, and returns a special code (ex. 'MSIE', 'Mozilla', 'Konqueror') which you can use in a decision tree from there. Would it be useful for the REQUEST object to have an API for this? Perhaps I'll play around a bit with it. Trouble is, like currancy converters, how do we keep the list up-to-date? An XML-RPC call? For features like Midas...good question. Not being real familiar with it, how do you invocate it in a page? It might not be possible to detect until it is released in the core with say, Mozilla 1.5, and you can know by the version number (unless it's disabled!)
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) --- [This E-mail scanned for viruses by Declude Virus]
-- Eron Lloyd Technology Coordinator Lancaster County Library elloyd@lancaster.lib.pa.us Phone: 717-239-2116 Fax: 717-394-3083 --- [This E-mail scanned for viruses by Declude Virus]
----- Original Message ----- From: "Tino Wildenhain" <tino@wildenhain.de> To: "Eron Lloyd" <elloyd@lancaster.lib.pa.us> Cc: "Gilles Lenfant" <gilles@pilotsystems.net>; <zope@zope.org> Sent: Monday, March 31, 2003 7:30 PM Subject: Re: [Zope] Detecting Mozilla based browsers
Hi,
detecting a special user-agent incarnation is usually a waste of time. Instead of trying to detect one of 1423124982739 browsers with different capabilities by their most of the time faked user-agent string, one should focus to silently fall back and check only availability of special attributes in the DOM.
Thanks, I'll try to do it this way.
IF you want to use a special DOM object, just look wether it is defined and choose your action based on this.
This way you silently support all browsers which try to be the same instead of making an endless growing list.
I personally HATE sites which tell me I would have an unsuported browser only because their sucking scripts fail.
I usually hate this too, but I need this to (try to) extend the IEEditor to give Mozilla+Midas users the ability to edit content with a WYSIWIG tool. Other solution : an applet, a flash stuff (if it can dial with a HTTP server) or structured text :(( The users want rich text formatting but don't want to learn 10 HTML tags.
Pretty please stop this sillyness!
It's not for introducing stupid marketing animations but a really useful stuff. --Gilles
On Mon, Mar 31, 2003 at 08:11:40PM +0200, Gilles Lenfant wrote:
I usually hate this too, but I need this to (try to) extend the IEEditor to give Mozilla+Midas users the ability to edit content with a WYSIWIG tool. Other solution : an applet, a flash stuff (if it can dial with a HTTP server) or structured text :(( The users want rich text formatting but don't want to learn 10 HTML tags.
htmlArea 3.0 may help on some of the coding, and may have sufficient detection capabilities. You might even be able modify it to do the preferred dom inspection business. At least in its current incarnation, it does rich text editing for both IE 5.x and Mozilla 1.3. If someone more skilled than me manages to integrate this into CMFVisualEditor, I'd be very happy. http://www.interactivetools.com/products/htmlarea/ -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (5)
-
Andreas Jung -
Eron Lloyd -
Gilles Lenfant -
Mike Renfro -
Tino Wildenhain