JavaScript Page Redirect

We can redirect users or browser to a different page or url by using JavaScript. This page uses client side script of client so script execution must be enabled in the browser.

If in browser script execution is disabled then JavaScript (Client side) page redirection won't work. You can check the status of script execution of browser and accordingly warn the users.

We will try first with some simple page redirect example and then we will add different features to it.

<script language='JavaScript' type='text/JavaScript'>
You can also redirect by using slef.location like this

Redirecting after Some time delay

If you are using the above code then the page will redirect to as soon as the page loads to client browser. Here we can delay the process of redirection and show a message. We will be using our timer function to do this. Here is the code.

<title>Javascript page redirect</title>
<script language='JavaScript' type='text/JavaScript'>

You will be reirected to google after 10 Secs

Try to add one count down display to show seconds left for page redirect to work.


* indicates required
Subscribe to plus2net



    Nice tutorial Great.

    Post your comments , suggestion , error , requirements etc here .

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 All rights reserved worldwide Privacy Policy Disclaimer