C
C#16mo ago
palapapa

❔ Same URL pages holding different states

This isn't really a asp.net problem, but I discovered this while reading its documentation and don't know where to ask this weird question. To know what I am asking about, open this URL https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-7.0&tabs=visual-studio in two tabs, then in one of the tabs, on the nav bar on the left, go to "APIs > Controller-based APIs > Tutorials > Create a web API with controllers" and open it. You will notice that now the two tabs have the exact same URL, but the navbars in the two tabs show different things. This persists even through refreshes. How can two tabs with the exact same URL show different things even after refreshing both of them?
Tutorial: Create a web API with ASP.NET Core
Learn how to build a web API with ASP.NET Core.
6 Replies
palapapa
palapapaOP16mo ago
After disabling the cache this still happens
Philémon
Philémon16mo ago
Because both nav links point to the same route probably, right ? I dont know for sure, but probably the navigation menu is one component, and the content displayed (like the tutorial) is the component that is linked to the route, so two separate things
palapapa
palapapaOP16mo ago
But how would the nav component know what to show if the URL is completely the same?
Philémon
Philémon16mo ago
Don't they show exactly the same thing? I m pretty sure its the same URL for the same content
palapapa
palapapaOP16mo ago
Did you do exactly as what I said? Here's what I see
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server