how to run javascript on a custom page before page load event

Highlighted
New Member
1 0 0

I have a javascript on a page

<script>
window.location.replace("exampleurl");
</script>

but this shows the page first for an instant and then re-directs.

How can I redirect without showing the page (before page loads)?

Thanks,

 

0 Likes