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
Solved! Go to Solution.
Views
Replies
Total Likes
For device detection refer and follow http://dev.day.com/docs/en/cq/5-6/developing/mobile/device-client-side-detection.html
Views
Replies
Total Likes
For device detection refer and follow http://dev.day.com/docs/en/cq/5-6/developing/mobile/device-client-side-detection.html
Views
Replies
Total Likes
Thanks, will look into that.
But the question still stands.
How does one redirect in javascript to an external URL?
Kind regards
Toby
Views
Replies
Total Likes