When does the _self
frame target becomes useful or worth using it?
Isn't it (always?) the default behavior?
There's A Security Reason For Not Using _BlankThe target=”_blank” link attribute is risky and opens a website to security and performance issues. Google's Web. dev page on the risks of using the _blank link attribute is summarized as such: “The other page may run on the same process as your page.
The target attribute specifies a name or a keyword that indicates where to display the response that is received after submitting the form. The target attribute defines a name of, or keyword for, a browsing context (e.g. tab, window, or inline frame).
The target attribute inside anchor tags ( <a> ) tells the browser where the linked document should be loaded. It's optional, and defaults to _self when no value is provided.
The default can be changed by using the <base>
tag in the <head>
:
<base href="http://www.mysite.com/" target="_blank"/>
In this case, you can use target="_self"
on a link to override the target
set by base
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With