You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rufoo <ru...@yahoo.com> on 2003/04/14 10:14:55 UTC

[users@httpd] Response based on User-Agent

I want to do some browser specific things in the HTML.


Should I do through client side javascript and do
something on the server side itself based on the
UserAgent header?

What is advisable?

Does anybody use the latter method? 

thanks
rf

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


AW: [users@httpd] Response based on User-Agent

Posted by Peter Thomassen <in...@peter-thomassen.de>.
Hello,

> Should I do through client side javascript and do something 
> on the server side itself based on the UserAgent header?

I'd prefer JavaScript because the UserAgent may be faked. You can
js-check things like window.opera which identifies Opera - AFAIK
there is no way to fake that.

You should provide a non-js version of your site, i.e. your js
should forward to an other page, and if someone is using a non-js
browser the js ist ignored and the content of the page is shown.

Peter



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org