Auto refresh code in HTML using meta tags

Sourabh picture Sourabh · Jan 3, 2012 · Viewed 460k times · Source

I'm trying to refresh the same page but it isn't working. This is my HTML code:

<html>
    <head>
        <title>HTML in 10 Simple Steps or Less</title>
        <meta http-equiv=”refresh” content=”5" />
    </head>
    <body>

    </body>
</html>

Answer

Dennis Traub picture Dennis Traub · Jan 3, 2012

It looks like you probably pasted this (or used a word processor like MS Word) using a kind of double-quotes that are not recognized by the browser. Please check that your code uses actual double-quotes like this one ", which is different from the following character:

Replace the meta tag with this one and try again:

<meta http-equiv="refresh" content="5" >