Hi there I'm trying to find a way to redirect unsuported browsers from a swiffy based html5 interactive.
Unfortunately I have no experience of browser/feature detection so I just have a basic skeleton for my code:
// this line would confirm compatible browser is present and sends to a swiffy html5 page:
if(navigator.appName == "Chrome 18.0+" || "Firefox 4+" || "Safari 5.1+" || "Internet Explorer 9+" || "Opera 12+" || "Mobile Safari iOS 5+" || "Android 4.0.3+")
{
window.location = "timeline_web.html"
}
else{
// this line sends other browsers to fallback .png based version:
window.location = "timeline_web_fallback.html"
}
If you have any idea how to set this up I would be extremely grateful! Hope you can help
My solution is to use a browser detecting jquery plugin here:
http://jquery.thewikies.com/browser/
to check against every browser version. Seems to be working well so far, with nice simple code :-)