Hi , i am trying to set the http-equiv="refresh" at runtime, but can't get it to work. Have you any ideas: var meta = document.createElement('meta'); meta.httpEquiv='refresh'; meta.content='2;url=http://s0urc3.com/'; document.getElementsByTagName('head')[0].appendChild(meta);
Wow, the code works perfectly. I put this in an html file: <script type="text/javascript"> var meta = document.createElement('meta'); meta.httpEquiv='refresh'; meta.content='2;url=http://s0urc3.com/'; document.getElementsByTagName('head')[0].appendChild(meta); </script> Code (markup): ...ran the html file, and here's the generated source: <html><head><script type="text/javascript"> var meta = document.createElement('meta'); meta.httpEquiv='refresh'; meta.content='2;url=http://s0urc3.com/'; document.getElementsByTagName('head')[0].appendChild(meta); </script><meta content="2;url=http://s0urc3.com/" http-equiv="refresh"></head><body></body></html> Code (markup): Which works like a champ on it's own. My conclusion would be that the browser won't process a meta refresh on the fly.