How we can show desired content based on visitors user agent ? For example how we can Show a funny picture when visitor come by IE and show content when they use firefox ...
you can use Javascript , visit this link for more <script type="text/javscript"> var browser=navigator.appName; if(browser == "Microsoft Internet Explorer") document.write(/ what you want to show in IE) else document.write(// what you want to show in other browsers ) </script> Code (markup):
and what about firefox ? can this work ? : if(browser == "Mizzila firefox") document.write(/ what you want to show in FF)
This should do the trick: <script type="text/javascript"> <!-- var browserName=navigator.appName; if (browserName=="Netscape") { document.write("You're currently using FireFox"); } else { if (browserName=="Microsoft Internet Explorer") { document.write("You're currently using Internet Explorer"); } else { document.write("You're using something that's \"not\" FireFox or Internet Explorer"); } } //--> </script> Code (markup):
No need to shout Netscape is a (now retired) browser that's built upon Firefox. I'm sure somebody will correct me if I'm wrong, although as far as I'm aware Firefox hasn't got it's own "browser name" in the sense that you can't type "mozilla firefox" as the browser name in IF statements etc... The code I gave you above works fine.