web.ctx.env['HTTP_USER_AGENT']
define a hook function for every request?
--
You received this message because you are subscribed to the Google Groups "web.py" group.
To post to this group, send email to we...@googlegroups.com.
To unsubscribe from this group, send email to webpy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
In my web application I have a decorator around all GETs and
POSTs. In this decorator I check e.g. for HTTP_ACCEPT_LANGUAGE
and do permission checks. Maybe this is a good place to check
the user agent as well.
If you happen to have a login page, you could also only check
there and than store the CSS file name in the session.
> (And my second question would be: am I doing anything really dumb..?
> In other words: is there a much simpler way to do so..?;)
Sounds fine, at least I'm planning to do the same dumb thing.
I wonder, what is the right check for a mobile browser? The most
important thing is screen size, right?