I am trying to make a webpage refresh at a certain time, for this I will be doing some calculations using java script to define when the webpage must be refreshed.
I am using this code but the content attribute for the meta tag is not changing.
<script language="javascript" type="text/javascript">
function myFunction() {
document.getElementsByTagName('META')[0].getAttribute("content")="5";
}
myFunction();
</script>
You can do it like this in vanilla JS (the example changes the meta tag with the name "keywords")
But to solve your problem i would not use the header tag, but a javascript timer, that reloads the page