By

Redirecting Pages in HTML 5

Internet Explorer 10 on Windows 8/2012 has compatibility problems in using the Refresh meta tag to redirect pages to a new URL. You can get around this by including a JavaScript redirect and an HTML link in case that doesn’t work.

Replace all 3 instances of www.website.com below with the URL that you want to redirect to.

— HTML code below —

<!doctype html>
<html>
  <head>
    <title>Page Title</title>
    <meta http-equiv="Refresh" content="0; url=http://www.website.com">

    <!-- If the meta tag doesn't work, try JavaScript to redirect. -->
 
    <script type="text/javascript">
      window.location.href = "http://www.website.com"
    </script>
  </head>

  <body>
    <!-- If JavaScript doesn't work, give a link to click on to redirect. -->
 
    <p>If you are not redirected automatically, click <a href='http://www.website.com'>here</a>.</p>
  </body>
</html>

One Response to Redirecting Pages in HTML 5

  1. abhishek kumar says:

    thanks its help me a lot for redirecting to other application.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.