I’m working on my mobile site, I already have this code:
<script type="text/javascript"> // <![CDATA[
if ( (navigator.userAgent.indexOf('Android') != -1) ) {
document.location = "android.html";
} // ]]>
</script>
which diverts android users away from the current page on to androids own dedicated page.
what I would like to do is the same thing but for an iphone / ipad. I would like iphone / ipod touch to land on iphone.html and ipad to land on ipad.html displaying different content for both. How can I do this?
thank you.
You can just expand your current approach to the other user agents: