Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is top-level navigation in browser terminology and in what ways it can be triggered?

When reading about SameSite attribute I came across the term top-level navigation.

As I understood it, it's when user has website1.com open in browser and then clicks the link that navigates browser to some other site eg. website2.com. But this is a loose definition.

So what exactly is top-level navigation in browser terminology? Is there some specification or RFC with strict definition of this term?

Can it be triggered in ways other than clicking a link that leads to another website (ie. having <a href="website2.com">website2.com</a> on website1.com)? What about if I just enter website2.com url directly in the browser's navigation bar, is that considered a top-level navigation?

Also, is top-level navigation important in other areas of browser/http/security beside using it with cookies and SameSite attribute?

like image 759
mlst Avatar asked Dec 08 '25 10:12

mlst


2 Answers

Basically, TOP LEVEL navigation changes the URL in your address bar. Resources that are loaded by iframe, img tags, and script tags do not change the URL in the address bar so none of them cause TOP LEVEL navigation.

like image 169
Shehryar Tariq Avatar answered Dec 11 '25 22:12

Shehryar Tariq


Top-level navigation refers to navigation within a top-level traversable.
Top-level traversables are independent browsing contexts that can directly contain top-level browsing contexts, such as:

  • Browser tabs
  • Windows
  • Popups

So basically, as Shehryar said, the address bar.

like image 42
shoaloak Avatar answered Dec 11 '25 22:12

shoaloak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!