Good afternoon.
Im trying to write a little javascript, that detects mobile agents.
If the agent is a mobile device, redirect.
<script>
window.onload = function() {
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
// If Mobile: Redirect
window.location.replace("http://www.externalurl.com");
}
}
</script>
Unfortunately, CQ doesnt like external URL redirection.
Is it possible, inside CQ to redirect from the client?
And if it is, how does one do it?
Kind regards
Toby