Tech Musings

Wednesday, November 30, 2005

Javascript browser sniffer redirect

On the teacher_exchange project, I looked for a way to sniff out to see if users had IE on the Mac. If so, I redirected them to a page to download Firefox. The script worked, but we ended up not implementing this feature.


if((navigator.userAgent.indexOf("MSIE") != -1) & (navigator.platform.indexOf('Mac') > -1))
window.location = "";



Post a Comment

Links to this post:

Create a Link

<< Home