Redirecting with JavaScript


Sometimes you want to redirect visitors to a different page, but don't have access to the server-side language on the server where your page resides. Here's how to redirect with JavaScript:

<script type="text/javascript">
    window.location = "";

That will redirect any visitors to the page specified, if they have JavaScript enabled. I also leave a note for those that have no JavaScript capabilities or in case something goes wrong:

This page is now at
<a href="">
</a>, thanks!

Here is how you can redirect using PHP, if you access to it: Redirect with PHP.