Thursday, 19 June 2014

Mobile redirection with Javascript

Put this in default page that will load and with script tags.

<script>
if( /Android|webOS|iPhone|iPod|BlackBerry|Symbian|IEMobile/i.test(navigator.userAgent) ) {
window.location = "mobile";
}
</script>

No comments:

Post a Comment