On Thu, May 8, 2008 at 3:41 PM, Amiri Barksdale
<[EMAIL PROTECTED]> wrote:
> I was thinking a global variable would be tied to users because that's
> precisely how I create a global User object for individual user
> sessions, but yeah, this js_enabled variable is not tied to sessions
> or anything in the same way.
>
> Amiri


It sounds like you want your site to behave differently if the user
has JavaScript enabled.  If you're really going for unobtrusive
JavaScript then your server side Mason code doesn't need to get
involved in the JavaScript enabled/disabled decision at all.  Since
unobtrusive JavaScript is only supposed to enhance the functionality
of the site and not implement critical path functionality its
availability should only come into play on the client side and not in
the Server side Mason code.

People with JavaScript enabled can be served the same page as people
with out it.  If the user has JavaScript it will run and add the
enhanced bits, if not it won't.

The only reason the server should care if the user has JavaScript
enabled is if you want to build your pages differently.  If this is
the case then you need to store information in each users session from
your comment above it sounds like you may already have some session
handling system.  If not then you need to implement one before you can
use it to help you keep track of which users have JavaScript.

-- Ben

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to