Header Ads

How to Redirect URL according to Mobile Device Using JavaScript

How to Redirect URL according to Mobile Device Using JavaScript
add this javascript in <script> tag it will automatically redrect
towards mobile content

<script type="text/javascript"> <!-- if (screen.width <= 699) { document.location = "mobile.html"; } //--> </script>



For iPhones/iPods Specifically

<script language=javascript>
<!--
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
   location.replace("http://url-to-send-them/iphone.html");
}
-->
</script>



Thnaking you-

No comments