Mozilla is the only browser vendor who’s mission is to promote open innovation on the world wide web.
This year we’ve been diving into Mobile web technology in big ways.
Please consider including the code below on your web site or your blog. (WordPress users you can simply include the code as a text widget, just remember to point the image links at images on your site.)
The script is simple.
1.) If the visitor is using Firefox (any version) – SayTHANKS !
2.) If the visitor is not using Firefox – check to see if they are using an Android device.
3.) If not, suggest they use Firefox.
4.) If they are using Android, suggest Firefox Mobile.
You can get much more fancy, but you get the idea.
THANKS ! If you add the code to your site – tweet the url to @MisfitGeek and I’ll re-tweet !
<script type="text/javascript"> if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { document.write("<h2>THANKS for Using Firefox !!!</h2>") document.write("<img src='http://misfitgeek.com/images/firefox3.jpeg' />"); } else { if (/Android[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { document.write("<h2>Get Firefox MOBILE !</h2>"); document.write("<a title='Get FireFox MOBILE!' href='http://www.mozilla.org/en-US/mobile/'> <img src='fennec-icon.jpeg' /></a><br />"); document.write("<b> Click the Tail & Get Firefox Mobile for Android! </b>"); } else { document.write("<h2>Please Consider Using Firefox !!!</h2>"); document.write("<a title='Get FireFox !' href='http://getfirefox.org/'> <img src='http://misfitgeek.com/static/getfirefox.png' /> </a>"); } } </script>
Great idea. I improved the script a bit not to use browser sniffing and document.write() as the former is just bad practice and the latter interferes with rendering of the page and is bad for performance.
You can try it out at JSFiddle:
http://jsfiddle.net/codepo8/V7Pee/
And the code is also as a GIST on GitHub:
https://gist.github.com/2955313
You can also use the gist directly in the src of your script element:
http://jsfiddle.net/codepo8/V7Pee/1/
I had some problems with this script, but finally it works well.
For those who have problems, you have to place everything that is between ” ” in the same line, otherwise the script doesn’t work.
Firefox Affiliates (https://affiliates.mozilla.org) has a similar program that displays different banners based on the browser and version.
http://chelseanovak.wordpress.com/2012/06/08/help-users-on-firefox-3-6-get-the-upgrade-message/
Affiliates might be a good way to get more traction on your idea.
The cynic in me both wonders if you weren’t pressured into this article and why it’s content isn’t active on your site…
I personally find it a bit aggressive and would hate it if the Mozilla/Microsoft war spread so overtly.
Not sure when you mean Phil. Since being at Mozilla I’ve NEVER been pressured to say anythng (unlike while I was at Microsoft). The content in the post was active when I wrote it but I’ve replaced it with a static banner for Firefox Android becuase that’t where I’m spending my time at the moment.
But I understand, spending too much time in the Microsoft channel will make you cynical 🙂
Hehe, I’ve questioned my allegiances for you Joe and am pleased to report I’m very much on the fence.
Firefox isn’t exactly struggling for users (despite Microsoft and Apple having the whole “shipped with the OS” advantage) but the point I was trying to make is I think this approach would do more harm than good for your cause if it really got some traction.
Your work on HTML5 support should speak for itself, and will do far better at migrating (and keeping) users.