Scenario
I was intrigued by the different loading times of Twitter's profile page based on how it is accessed:
- Clicking the profile link in the menu results in a 4-second load time with DOM and latest tweets loaded.
- Using the keyboard shortcut GP or the link on the left instantly displays the page.
Observations
- I noticed that for instant display using GP, the profile must have been recently viewed.
- Refreshing the browser requires the profile to be displayed again for instant page access using GP.
Research
Initially, I thought Twitter might use serverside session variables, but I found evidence of localStorage in their source code. Despite my unfamiliarity with DOM storage, the JavaScript used by Twitter remains indecipherable to me, leaving me unsure if they store profiles with localStorage.
Inquiry
Does anyone have any theories, information, or resources regarding Twitter's usage of DOM storage or session storage?