[Catalyst] Checking client browsers, best approach?

Wade.Stuart at fallon.com Wade.Stuart at fallon.com
Wed Sep 20 17:44:21 CEST 2006







catalyst-bounces at lists.rawmode.org wrote on 09/20/2006 08:41:25 AM:

> Great info guys thanks, I will take all of this and work with it.
>

Also,  if you do not want to feed js to all requests with or without
javascript support (browser js support + javascript actually turned on) you
can do a onload on the first hit that generates a session to ping back to a
sub that sets session->{jssupported} on.   That way you not only know that
the browser supports js,  but it actually has it enabled.  It really
depends on how you are going to construct your pages and fallthrough for
legacy (or secure) browsers.


>
> ----- Original Message -----
> Subject: Re: [Catalyst] Checking client browsers, best approach?
> Date: Wed, September 20, 2006 9:19
> From: "Brian Cassidy" <brian.cassidy at nald.ca>
>
> > Hi Ryan,
> >
> > Ryan wrote:
> > > OK, here is what I need to do.  I'm writing a reservation system for
a
> > > hotel and I have some cool features in mind for the process but they
> > > require javascript and "newer" browsers. What I was planning on doing
is
> > > creating the bare-bones pages that work in any browser, no JS just
all
> > > server calls etc...then I want to go back and insert the new stuff
where
> > > it's appropriate but only for the people that can handle it.  I was
> > > thinking of having a landing page(default or something) that ran some
> > > tests to see if that could fail. Then I thought it might be easier in
the
> > > begin function to just check browsers and set a variable in the stash
if
> > > they can handle the new stuff or not. What's the best way to go about
> > > doing this, should I just scan the req variables that come in and
make my
> > > decision on that or does Catalyst have something better?
> > >
> > The "experts" have told us that browser sniffing is evil -- god kills a
> > kitten, yadda, yadda. The preferred method to use is called "object
> > detection" [1]. If you're using a pre-built ajax framework, check to
see
> > if it has some object detection built in.
> >
> > -Brian
> >
> > [1] http://www.quirksmode.org/js/support.html
> >
> >
> >
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/




More information about the Catalyst mailing list