Meta Refresh

The redirects to the provided URL in 5 seconds. Set to 0 for an immediate redirect.

<meta http-equiv="refresh" content="5;url=" />


  1. Robin
    Permalink to comment#

    This will only work if it is enabled in the browser settings. I belief it’s enabled by default but don’t depend on it.

    To be sure, always use a “Click here if it does not redirect in 5 seconds”-link.

    • Kartlos Tchavelachvili
      Permalink to comment#

      Can you tell me were you can disable meta tag(s) in your browser settings? :)

  2. Robin
    Permalink to comment#

    Very easy. If you use Internet Explorer.

    I always use Firefox. But you’ve got to keep in mind that it is possible to disable meta refreshes. That’s why most sites have the “Click here to continue” or “Click here if it does not forward” links.

    En by the way, even while I’m using Firefox, I prefer those links. Most of the times it’s faster to click that link than to wait for their timer to finish and forward.

  3. Kartlos Tchavelachvili
    Permalink to comment#

    Ok, but I think nobody will disable meta tags manually in their browser settings if they do not have special reason for it. In some cases you can not use url redirect(“click here”) or server side code, so this one comes useful.

    • mark luiz
      Permalink to comment#

      bro i just like to say that u r smart as its true most of us will disable meta tags manually in their browser settings if they do not have special reason for it.
      I agree with ur point… Hats off… Bravo…

  4. Kostas

    If someone has meta refresh disabled then I suggest people should use:

    – k0st4s

    • Kostas

      >?php header( “refresh:5;url=YOUR URL” );<

    • John D.
      Permalink to comment#

      Obviously header(“refresh:5;url=YOUR URL”); is a ridiculous and idiotic use of a php function. You can not create asynchronous delayed refreshes in PHP. The header function provides a header which has to be received by the client in the header part of your request. Also the syntax you provided is completely wrong and why would you even assume that html meta tags and php/http headers share a common layout?
      Do NOT listen to this guy. Either he’s a troll or he really is the dumbest person alive.
      It would be better for everybody if his entries got removed.

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

We have a pretty good* newsletter.