Code Snippet

Home » Code Snippets » HTML » Meta Refresh

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=http://example.com/" />

Subscribe to The Thread

  1. 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.

  2. 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. 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.

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

    - k0st4s

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~