The navigation context can be understood as an instance (or session) of the browser, it can be a window, a tab or a <iframe>
, with independent navigation history.
In HTML 5 a context is created by setting a <iframe>
with the name
attribute or clicking a link or sending a form with the target
attribute set other than the special values ( _self
, _blank
, etc.).
Example of operation:
Note: You have to save the content in an HTML file because it does not work correctly on the site because of restrictions.
Click the first link, it will open in a new tab (create a new context), go back to the tab and click on the second link that will open in the same tab as the first link. Because both links have the attribute target
with value meu-contexto
.
<ol>
<li><a href="http://pt.stackoverflow.com/" target="meu-contexto">StackOverflow pt</a></li>
<li><a href="http://stackoverflow.com/" target="meu-contexto">StackOverflow en</a></li>
</ol>
The name of the current context can be accessed by the window.name
Javascript property. Modifying this property can unlink the current context from the parent context. You can create a link by modifying this property only when a parent / child relationship, such as <iframe>
.
Related documentation: link