Hmmm... sorry.  I work in Japan and all the WAP phones over here have UP.Browser in 
the user-agent header.  Maybe I should get out
(of the country) more.  Wonder what it's like in the US.  Anyway, getting very off 
topic.

I'll give you the 100 quid the next time I'm in the UK, Dave  ;-)

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 23, 2001 6:51 PM
Subject: RE: Opinions on detecting browser type for WML vs. HTML


> What do you mean by "The 'user-agent' header always contains the string "UP.
> Browser"
>
> I bet you 100 pounds that it doesn't. A Nokia phone on a Nokia or CMG
> Gateway will not have "UP" anywhere.
>
> Dave
>
>
>
> -----Original Message-----
> From: simon [mailto:[EMAIL PROTECTED]]
> Sent: 23 October 2001 10:37
> To: tomcat-user
> Subject: Re: Opinions on detecting browser type for WML vs. HTML
>
>
> It's probably easier to spot the WAP browser rather than the other way
> around.  They send all sorts of goodies in their headers.
> The 'user-agent' header always contains the string "UP.Browser" so you could
> search for that.  WAP browsers usually send the
> 'accept' header as well so you could use that to look for
> 'text/vnd.wap.wml'.
>
> That's my opinion.  (I personally use the user-agent)
>
>
> ----- Original Message -----
> From: "Dr. Evil" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 23, 2001 6:16 PM
> Subject: Opinions on detecting browser type for WML vs. HTML
>
>
> >
> > I am working on a site where the same URL will be hit by both WML and
> > HTML browsers.  Fortunately, with Tomcat, it's very easy to have a
> > controller servlet which takes all incoming requests and decides to
> > forward them to various processors.  The problem is, how should I make
> > this servlet decide what to do?
> >
> > It looks to me like basically every ordinary web browser in use
> > includes the string "Mozilla" somewhere in its browser type header.  I
> > believe this includes IE, Netscape, Konqueror, Galeon, Opera and
> > almost all the others.
> >
> > My current thought is to check for the string "mozilla".  If it's
> > there, you get HTML, and if it's not there, you get WML.
> >
> > Is this a reasonable approach?  I like to do things in a way that is
> > browser independent, but in this case I don't see how to do it.  There
> > really should be a header sent by the browser listing the MIME types
> > it accepts, perhaps, but there isn't so I don't know any other
> > alternative.
> >
> > Thanks
> >
>

Reply via email to