I have a website, and offcourse like most websites it loads faster in Firefox.
I want to create some form of a bar, which displays on top of my site, whenever a user without FF enters the site.
This bar will say something like “Install FF for better performance etc etc…”
How should I do this? Browser detection I guess, but there are tons of different codes out there. Any code you all know that is more reliable, and better to use?
Btw, does anybody know if I need permission from Mozilla to have such a bar on my website?
Thanks
EDIT: FF IS NOT THE FASTEST BROWSER, I GOT IT!
(Skipping all the arguments on whether what you want to do is a good or a bad thing. Assuming you really like Firefox and want to promote it.)
Use the
navigatorobject to check if the browser is Firefox.navigator.appCodeName,navigator.appName,navigator.appVersion. What you want to do is not a critical part of your website, so you don’t need a fail-safe detection method. If it works for over 95% of your targeted users than the method is good.I doubt you need permission to advertise a free product. Mozilla even encourages you to do so.