I want an iframe to refresh every 5 seconds, but it doesn't work and I don't understand why? I manually changed the text file but it won't refresh on the site automatically. Is it any special with text files?
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<script>
window.setInterval("reloadIFrame();", 5000);
function reloadIFrame() {
document.frames["knasFrame"].location.reload();
}
</script>
<iframe name="knasFrame" src="output.txt"></iframe>
</body>
</html>