Search code examples
htmlhttp-redirectmeta

How to redirect in "NEW" tab with meta


Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code

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

but it redirects it in same page. And if i add the following code after the url then also nothing happens

target = "_blank"

Please help me.


Solution

  • You can try something like this:

    <meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_blank');">
    

    This post is related to your question.