You need to use the name attribute:

window.open("https://www.youraddress.com","_self")

Edit: Url should be prepended with protocol. Without it tries to open relative url. Tested in Chrome 59, Firefox 54 and IE 11.

Answer from vdbuilder on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs - MDN Web Docs
The open() method of the Window interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
Discussions

How to make Edge to open links on the same tab by default
Open links from news results in a new tab or window · Save then close and open the browser, now every link will open in same tab More on learn.microsoft.com
🌐 learn.microsoft.com
48
171
April 20, 2024
How to make links open in same tab? - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on More on support.google.com
🌐 support.google.com
October 19, 2019
Opening the same Tab if its already opened by clicking the same link | OutSystems
Opening the same Tab if its already opened by clicking the same link More on outsystems.com
🌐 outsystems.com
July 12, 2021
Open new tab instead of new window
There are some possibilities to open a link in the same tab see below: In Microsoft Edge, you can open a link in a new tab, just right-click on the link and then choose “Open in a new tab” · You can also use the Ctrl key (press it and keep it pressed) and click with the left mouse button and the link will open in a new tab. NOTE: If the links that are opening in a new window ... More on learn.microsoft.com
🌐 learn.microsoft.com
4
198
🌐
W3Schools
w3schools.com › jsref › met_win_open.asp
Window open() Method
The open() method opens a new browser window, or a new tab, depending on your browser settings and the parameter values. The close() method. window.open(URL, name, specs, replace) Open an about:blank page in a new window/tab: var myWindow = ...
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-open-url-in-same-window-and-same-tab-using-javascript
How to open URL in same window and same tab using JavaScript ? - GeeksforGeeks
July 24, 2025 - The "_self" parameter specifies that the URL should be loaded in the current window. Example: In this example, we have used the window.open() method to open the "geeksforgeeks.org" URL in the same window and in the same tab.
🌐
Sololearn
sololearn.com › en › Discuss › 346470 › how-to-open-url-in-same-window-and-in-same-tab-
How To Open URL in same window and in same tab ??? | Sololearn: Learn to code for FREE!
:) ... target=_blank is used to open link in new tab, what if we remove target attribute, won't that help in html, and In JavaScript by default would be different like opening in new tab .....
Find elsewhere
🌐
Google Support
support.google.com › chrome › thread › 17211390 › how-to-make-links-open-in-same-tab
How to make links open in same tab? - Google Chrome Community
October 19, 2019 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
Top answer
1 of 4
13

Thanks for reply. None of those options worked. The problem is 50/50, some hyperlinks it works find, others hyperlinks it doesn't.

  • Right clicking option is disabled (greyed out).
  • Holding CTRL doesn't work either. It still opens it in a new browser window
  • The problem seems to depend on the hyperlink.
  • I ran the powershell option on a test PC and nothing changed.
  • I know there is a way to fix this because my PC (profile) works just fine. I have a few other staff that work fine. But anytime I hire a new person or they log into the PC profile of their own, it reverts back to opening up links in a new window.

Chrome has a simple option that says (open links in a new tab), is there no simple setting option in edge? My company I'm contracted with requires us to use edge.

2 of 4
5

Hi JDSuser, welcome to the Microsoft community, my name is Bruno Leonel.

We will be happy to help and see if we can resolve this issue for you. Follow some of the recommended suggestions below that have helped others.

I understand that you are having problems opening links in a new tab and I will try to help you in the best way.

There are some possibilities to open a link in the same tab see below:

In Microsoft Edge, you can open a link in a new tab, just right-click on the link and then choose “Open in a new tab”

You can also use the Ctrl key (press it and keep it pressed) and click with the left mouse button and the link will open in a new tab.

NOTE: If the links that are opening in a new window are from the google search site

At the bottom of the page click settings -> search settings

And confirm that the following option is checked: "Open each selected result in a new browser window"

Give it a try, if it doesn't work, check the steps below:

To try to resolve it, follow the steps below:

step 1

With Microsoft Edge open press Alt+F;

Click "Settings" / "Reset Settings" / "Restore Settings to Default Values";

And confirm by clicking Reset;

Close the browser and open it again.

After this process, check if you are in agreement.

Step 2

Note: If when opening Microsoft Edge, a Welcome tab opens, it means that the browser has been reset. Make a backup of your bookmarks before performing this action.

Close Microsoft Edge.

Open the start menu and type PowerShell.

Right-click Run As Administrator.

Copy and paste the command below:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "C:\Windows\SystemApps\*Edge*\AppXManifest.xml"}
$manifest = (Get-AppxPackage *Edge*).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest

After the command execution is complete, try to open Microsoft Edge.

If the answer helped in any way, please mark it as an answer, if your question has not been solved, please post again.

I hope I helped, see you later!

🌐
CodexWorld
codexworld.com › home › how to guides › how to open url in same window and tab using javascript
How to Open URL in Same Window and Tab using JavaScript - CodexWorld
April 15, 2023 - The JavaScript window.open() method allows you to open URL in the browser tab or window. You can use _self value in the second parameter of the window.open() method to open the URL in the same tab and in the same window with JavaScript.
🌐
Western Washington University
marcom.wwu.edu › accessibility › guide › links-should-open-same-tabwindow
Links should open in the same tab/window | University Communications and Marketing | Western Washington University
Links that are set to open in new tabs/windows have no override for this behavior, so users are forced into a new tab/window whether they prefer that behavior or not.
🌐
Kevincox
kevincox.ca › 2023 › 04 › 24 › browser-link-open-newwindow
Should Links Open in the Same Tab or a New One? - Kevin Cox
April 24, 2023 - Open “new window” links in a new tab of the current window. Personally I set it to 1 to make all links open in the same window. Overall this works well and makes the web more predictable. However, it can cause some site breakage.
🌐
Google Support
support.google.com › websearch › thread › 284658930 › how-can-i-make-links-on-the-same-homepage-open-on-the-same-browser-or-tab
How can I make links on the same homepage open on the same browser or tab? - Google Search Community
July 10, 2024 - Skip to main content · Google Search Help · Sign in · Google Help · Help Center · Community · Google Search · Terms of Service · Submit feedback · Send feedback on
🌐
Google Support
support.google.com › sites › thread › 175683457 › how-can-i-make-links-open-in-the-same-window
How can I make links open in the same window? - Sites Community
Skip to main content · Sites Help · Sign in · Google Help · Help Center · Community · Sites · Terms of Service · Submit feedback · Send feedback on
🌐
UsefulAngle
usefulangle.com › post › 337 › html-open-links-in-same-tab
Open Links in a New Tab, Or Re-Use Already Existing Tab
November 27, 2020 - This behavior is beneficial in the case where we want to limit the number of new tabs created by the page. This can be achieved in HTML by setting the same name for the target attribute for all the given links. The name can be anything as per wish. <!-- same target attribute --> <a href="https://google.com" target="child">Link 1</a> <a href="https://bing.com" target="child">Link 2</a> <a href="https://msn.com" target="child">Link 3</a> If opening the links with Javascript open() method, the same window name needs to be provided for the given set of links.
🌐
Reddit
reddit.com › r/bigseo › why is it a good practice to open an internal link in the same tab and not on a new tab?
r/bigseo on Reddit: Why is it a good practice to open an internal link in the same tab and not on a new tab?
April 12, 2022 -

I mean I'd like to know what difference it makes?

I have heard this a lot of times, but I am actually not sure about the reasons.

Help me to understand it properly?

Top answer
1 of 4
4
From this excellent Nielsen Norman article : Since 1999, it's been a firm web-usability guideline to refrain from opening new browser windows for several reasons. All of these also apply to opening new browser tabs and are still valid today: More windows or tabs increase the clutter of the user’s information space and require more effort to manage. New windows or tabs can cause disorientation, with users often not realizing that a new window or tab has opened. This problem is exacerbated on mobile, where the old window is never visible. Less-technical users struggle to manage multiple windows and tabs, especially on mobile. (On tablets, where users can have both multiple windows and tabs for the browser, it’s even more confusing.) New windows or tabs prevent the use of the Back button for returning to the previous page and force the user to spend effort to find their way back to the previous content. New windows or tabs are not inclusive for blind or low-vision users — especially when they open outside of the area that's magnified. Almost every website opens internal links in the same tab. If your site starts doing that differently, I would experience that as terrible user-experience. That's subjective of course, but for UX reasons I'd recommend you avoid it.
2 of 4
3
I always set them to open in a new tab. I want my visitors to stay on the site, so if they click an intrenal link out of curiousity, they may not necessarily want to leave the page they were on/may continue that page aftrewards. But if it opens in the same tab, it reduces the chances of them continuing. I want my visitors to stay on the site, so if they click an internal link out of curiosity, they may not necessarily want to leave the page they were on/may continue that page afterwards.
🌐
Reddit
reddit.com › r/qutebrowser › force link to open on the same tab?
r/qutebrowser on Reddit: Force link to open on the same tab?
October 22, 2020 -

I made a simple startup page, i used a template i found here on Reddit, and i was able to put it as the default page when i open a new tab and a new window. This page has all the links i use the most.

The thing is.. All the links open on a new tab, and i want to avoid this, since with every link i click, i now have two tabs, one with facebook (for example) and another one with the default page i made with the links.

Is there a way to avoid this? Make all my links open on the same tab without opening new ones.

I hope i make myself clear, english it's not my native language.

🌐
Google Support
support.google.com › chrome › thread › 3520860 › how-do-i-set-chrome-to-open-links-in-a-new-tab-on-the-same-browser-window
how do i set chrome to open links in a new tab on the same browser window? - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on