I have this script at the very top of my page
<script type = "text/javascript">
if(typeof window.orientation !== 'undefined'){ var ortvalue = "defined"; }
if(ortvalue != "defined") {
document.location.replace("http://www.redirect-here.com");
}
else {
}
</script>
All the script does is check if the user is on a computer, as opposed to a mobile device. If the user is on a computer, then the script redirects to a different site. The script works fine, but sometimes the page loads and displays for a moment before the redirect occurs. It's a minor nuance, but I was hoping there was a way to prevent the page from displaying any content while the redirect occurs.