On May 22, 9:38 am, omat <[EMAIL PROTECTED]> wrote:
> Is it a good idea to use a middleware class to detect the browser
> client looking at the HTTP_USER_AGENT so as to serve presentation
> logic accordingly, for mobile devices or older browsers, etc...?

I would advise against this because it won't play well with caching
proxies in between you and the client. If an intermediate proxy caches
your page for Internet Explorer and serves it up to a client running
Firefox stuff will break in very mysterious ways.

You can work around this with the HTTP Vary header, but many proxies
are notoriously badly written so I'm not sure that I'd trust it. Much
better to serve up a standards compliant site for Firefox/Safari/Opera
and have a single stylsheet included using conditional comments for
any specific IE fixes.

Cheers,

Simon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to