Skip to content

Instantly share code, notes, and snippets.

var operatingSystem, userAgentString = navigator.userAgent;
if (userAgentString.indexOf("iPhone") > -1 || userAgentString.indexOf("iPod") > -1 || userAgentString.indexOf("iPad") > -1) {
window.location = ""; // URL for iOS devices
} else if (/Android/.test(userAgentString)) {
window.location = ""; // URL for Android devices
}