To open in a new tab or new window you need target="_blank" attributes otherwise they will open in the same tab in quick succession. Even then you cannot control whether a browser will open in a new tab or in a new window. Anyway my Firefox, Chrome and Edge block all such popups from opening.
You could have the links open in iframes on the same web page.
Is the fullest link pattern I get from the MediaWiki content management system.
I don’t know why the MediaWiki community chose to format links with /index.php/.
I wonder if you are seeing your web page refreshed, not the web page you want, because the relative URLs are incorrect.
I believe that I was wrong to use the term “refreshed”, nothing is really refreshed:
I just get a new tab with the same URL as of the previous tab (i.e. the one I ran the code at).
Anyway, I wonder whether it’s worth continuing with this approach because of the impact of browser popup blockers.
I too think that this strange behavior comes from popup blocker, because:
If I configure the popup blocker to not block popups for the respective domain, than the new tab with the same URL as of the previous one problem no longer happens but if I flush all browser cache (pop up blocking comes back), than this problem comes back as well
Why would a unconfigured pop up blocker cause a new tab with the same webpage of the previous one to be created this way?
I don’t have a clue.
It’s even stranger that this problem happened both in Chrome and Edge browsers.
@Archibald I have deleted the post above yours.
I am sorry for the mistake in saying that I read full links in the DOM, I didn’t.
I only read these in the link preview in the bottom-left part of the window and as the URL in web pages accessible from these links.
I don’t know why MediaWiki doesn’t have full links in the href.