When to use target="_self"
_self
target value could also be useful in conjunction with AngularJS's HTML5 location mode when you do need to force full page reload for links with the same base as your single page app.
https://docs.angularjs.org/guide/$location#html-link-rewriting
In cases like the following, links are not rewritten; instead, the browser will perform a full page reload to the original link.
Links that contain target element Example:
<a href="/ext/link?a=b" target="_self">link</a>
...
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
.