Using Javascript to override or disable meta refresh tag

I’ve found that the noscript tag works quite nicely for this. For example, you can place this just after you close the head element:

<noscript>
    <meta http-equiv="refresh" content="5;URL=http://www.example.com">
</noscript>

No need to remove the meta tag with script, since a browser that has script support will ignore everything inside the noscript element.

Leave a Comment