I'm looking for an answer considering both technical limitations and user experience.
Does it need a reload from a technical standpoint?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityI'm looking for an answer considering both technical limitations and user experience.
Does it need a reload from a technical standpoint?
Sort of, yes.
Global login uses HTML5 localStorage (under the stackauth.com domain) to work around cookies not being available*. As a consequence, this means that we can't recognize a user at page render time; we have to wait for a non-trivial amount of javascript to load and execute.
Once global login has finished, we've got the user information... but the user could already be interacting with the page; a hard refresh would be really unpleasant. We actually tried this in the very early days of the global log system; if you've got a really speedy connection** it's ok, but any sort of latency results in a UX that makes you want to punch your screen.
The one exception to this rule, where we do in fact automatically navigate away, is when a user is on the login page. Presumably all the user wants to do is login there, so global login completing is a strong signal to navigate away from the page.
*We can't attach a cookie on askubuntu.com from stackoverflow.com, nor can we access stackoverflow.com's cookies from askubuntu.com; as an example. This is the crux of the issue. We used localStorage instead of third-party cookies (which would impose the same constraints, but be simpler to implement) because Safari has really dodgy support for third-party cookies.
**Remember, a solid 1/2 of our user base is on a different continent than our data center. We work hard to make our code fast, but we can't do much about the speed of light.
According to balpha's answer at Why does it says "welcome back -user- click here to 'refresh page'" it is not a technical issue, rather it's because you may already be reading a post. If that was the case, an automatic refresh would be annoying.
Does it need a reload from a technical standpoint?
Kevin explains why it's this way now.
If they wanted to make it so that a reload was not required, they would have to change a lot of data that's currently static based on the cookie to dynamic (AJAX/javascript/jquery/whatever) loading.
So it's possible to change the system so that a reload is not necessary.
However, it causes a substantial penalty in page loading time. Right now a lot of page data is static, but if everything were dynamically loaded you'd have to wait some time for the javascript to load and run, communicate with the authentication servers, and then communicate with the original server again prior to letting the browser render the page.
You could do a hybrid, where it loads the static content, then replaces it once it's received new info, but that may result in the same symptom - the page appears to reload while you're reading/scrolling/etc.
So yes, it's possible, but it's not practical from a performance standpoint.