Forum Moderators: open

Message Too Old, No Replies

Redirect in Same Tab

         

almo136

2:33 am on Jun 26, 2009 (gmt 0)

10+ Year Member



Hi,

I'd like to automatically redirect a page when it is opened. I need the redirected page to open in the same window/tab.

I've tried this meta redirect but this opens a new tab:
<META http-equiv="refresh" content="0;URL=redirect.html">

I've also tried this JS but it also opens a new tab:
window.location = "redirect.html";

Does anyone know how I can redirect but stay in the same tab?

Thanks!

tedster

3:22 am on Jun 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Neither of those approaches will open a new tab or window on its own. The culprit is most likely hiding in the source code for redirect.html.

almo136

1:13 pm on Jun 26, 2009 (gmt 0)

10+ Year Member



So the methods mentioned above should open it in the same tab?

redirect html is just a blank file at the minute.

I'm guessing it may be a setting in my firefox then?