miércoles, 22 de mayo de 2019

Link for App Download - Mobile OS Detection and Redirect Download Link to Appropriate App Store


<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Redirect</title>
<script type="text/javascript"> // <![CDATA[
//iPhone Version:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
window.location = "http://goo.gl/IWd7J";
}
//Android Version:
if(navigator.userAgent.match(/android/i)) {
window.location = "http://goo.gl/1K1Hi";
}
//Blackberry Version:
if(navigator.userAgent.match(/blackberry/i)) {
window.location = "http://goo.gl/jH2wD";
}
</script>
</body>
</html>

What if we need to redirect user to different page when on desktop or large screen?
}
//Blackberry Version:
if(navigator.userAgent.match(/blackberry/i)) {
window.location = "http://goo.gl/jH2wD";
else {
window.location = "PLACE THE URL FOR LARGE SCREENS HERE";
}

</script>


0 comentarios:

Publicar un comentario

Translate = traduce

Nuestros ultimos