Daily Archives: 14 July 2016

Create an HTML page with no JavaScript that will redirect the user after a few seconds

The following sample page will redirect the user to bytefreaks.net after 5 seconds. This page does not require JavaScript to be enabled on the user’s browser.

To modify the delay time and the redirect path, you need to edit the following line in the head of the page <meta http-equiv="refresh" content="5;URL=http://www.bytefreaks.net/">. In this example we set the delay to 5 seconds and the redirect url to be http://www.bytefreaks.net/.

You can download a working example of this code here ( DelayedRedirect.html (compressed) (560 downloads) ). If you rename the file to index.html and place it in a folder, it will be the first file that your webserver will read and the redirect will be applied.

<!doctype html>

<html lang="en">
    <meta charset="utf-8">
    <title>Bytefreaks.net Redirect Page</title>
    <meta name="description" content="A page that will redirect the user to bytefreaks.net after 5 seconds">
    <meta name="author" content="Bytefreaks.net">
    <meta http-equiv="refresh" content="5;URL=http://www.bytefreaks.net/">

  <body bgcolor="#ffffff">
    <center>You will be automatically redirected to <a href="http://bytefreaks.net">bytefreaks.net</a> as this resource is not available.</center>