DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

HTML Redirect

05.18.2006
| 6071 views |
  • submit to reddit
        I know this is a lame snippet, but I'm tired of writing this from scratch every time.

<html>
<head>
  <title>Page Title</title>
  <meta http-equiv="Refresh" content="2; URL=http://the.url">
  <script type="text/javascript">
    location.replace('http://the.url');
  </script>
</head>
<body>
  <p><a href="http://the.url">Page Title</a></p>
</body>
</html>