Was very handy for me when I had a page I wanted to load into Firefox's sidebar. I wanted any links clicked to stay in the sidebar instead of opening the links in the main window. Adding the above to the <head> fixed me right up and all the page's links stay within the sidebar.
_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.
The default can be changed by using the
<base>
tag in the<head>
:In this case, you can use
target="_self"
on a link to override thetarget
set bybase
.Was very handy for me when I had a page I wanted to load into Firefox's sidebar. I wanted any links clicked to stay in the sidebar instead of opening the links in the main window. Adding the above to the
<head>
fixed me right up and all the page's links stay within the sidebar._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