Thread: platform detect
View Single Post
Old 29-01-2007, 05:10   #2 (permalink)
mx
fucksocks™
 
mx's Avatar
 
Join Date: Jun 2005
Location: in the boosh
Posts: 1,615
we used this little piece of javascript to detect Firefox on a Mac. Pretty basic stuff and easy adapt to suit your requirements.

Code:
function detectFirefoxMac(){ var userAgent = new String(navigator.userAgent); var platform = navigator.platform; if (userAgent.search("Firefox")>-1 && platform.search("Mac")>-1) { return true; } else { return false; } }

I believe it's possible to spoof your user-agent and platform though, just so you know.
__________________
  Reply With Quote