I have a jsp page. In that I have multiple links. In http mode, if any link clicked then it opens the target page in the same window.
but in https mode, if any link clicked then it opens the target page in a new window. How to open the target page in the same window when in https mode.
I believe html target attribute has its own options to open link..
<a target="_blank|_self|_parent|_top|framename">
<a herf="" target="_parent">LINK</a>
should open link in the same parent window instead of popping up new window.
Related
Chrome gives the option to open links in new tab in same group.
I want to open an a tag link in my website in a new tab in the same group in chrome. How can this be done from HTML code?
It should work if you set the target attribute to _blank, which tells the browser to open the link in a new tab/window, depending on the browser's settings.
I tried to open a link from a website that was in a chrome tab group and the new open tab was then in the same tab group by default.
If you do that don't forget to add the rel attribute set to noreferrer noopener to prevent possible malicious attacks from the pages you link to.
Here is an example from freecodecamp.org:
<p>Check out freeCodeCamp.</p>
Here is the link to that tutorial from freecodecamp.
Safari (v11.0.3 for example) now supports download attribute on anchor elements, BUT, using them will break other links on the page which use the _blank target browsing context.
Example:
<html>
<body>
<a href="/file_to_download" download>Download</a>
<br/>
View
</body>
</html>
Click on "View", browser opens page in new window.
Click on "Download", browser downloads the file requested.
Click on "View" again, browser downloads the page rather then open a new window.
Change the target attribute of the View anchor, and there are no problems (...except you'll not open a new window, of course.)
Other browsers handle this as expected, downloading one, viewing the other.
Am I missing something?
I have an <object> which shows a table from an external website. The problem is that when you click on a link in the table, the site opens in the <object> window.
Is it possible that I click on a link, and the site opens normally and not in the <object> window?
No.
It would require that the page in the frame set the link targets to _top or _parent. By default a link will open in the same frame.
Assuming you don't control the page loaded into the frame, you have no way of changing the link target (and the same origin policy prevents you changing it with JS).
When running my application in debug mode I would like to display an HTML anchor link that opens the chrome://inspect page (I can safely assume users are using Chrome).
I can construct a link like the following:
Open Chrome Dev Inspector
When hovering over the link, it shows the expected URL in the Chrome status bar, but clicking it does nothing. If I right click and "open in a new window" it just opens a blank page (about:blank).
When clicked, the following error is shown in the console:
Not allowed to load local resource: chrome://inspect/
Is it possible to programmatically open chrome:// URLs?
I am trying to link to chrome://extensions in a normal HTML page (of a non-extension). However clicking the link won't do anything:
chrome://extensions
Right-clicking and opening in new tab just opens the about:blank page. How do I provide a working linking to the Chrome extensions page?
As you can see if you open the console, this is completely impossible, for security reasons.