Auto refresh code in HTML using meta tags
HtmlMetaHtml Problem Overview
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>
Html Solutions
Solution 1 - Html
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" >
Solution 2 - Html
You're using smart quotes. That is, instead of standard quotation marks ("
), you are using curly quotes (”
). This happens automatically with Microsoft Word and other word processors to make things look prettier, but it also mangles HTML. Make sure to code in a plain text editor, like Notepad or Notepad2.
<html>
<head>
<title>HTML in 10 Simple Steps or Less</title>
<meta http-equiv="refresh" content="5"> <!-- See the difference? -->
</head>
<body>
</body>
</html>
Solution 3 - Html
The quotes you use are the issue:
<meta http-equiv=”refresh” content=”5" >
You should use the "
<meta http-equiv="refresh" content="5">
Solution 4 - Html
<meta http-equiv="refresh" content="600; url=index.php">
600 is the amount of seconds between refresh cycles.
Solution 5 - Html
Try this:
<meta http-equiv="refresh" content="5;URL= your url">
or
<meta http-equiv="refresh" content="5">
Solution 6 - Html
Try this tag. This will refresh the index.html
page every 30 seconds.
<meta http-equiv="refresh" content="30;url=index.html">