Context
I realized that in Twitter, the profile page is displayed in different ways depending on how it is called:
- By clicking the profile link in the menu, the DOM and the latest tweets are loaded, and the page is displayed in ~4 seconds. Each time.
- Using the keyboard shortcut GP (or the link on the left), the page is displayed instantly.
Details
- I noticed that the profile must have been recently displayed for GP instantly displays the page.
- By closing and opening the browser, the profile must be displayed again for GP instantly displays the page.
Investigation
So at first I thought Twitter could use a serverside session variable to store data. Then I discovered a use of localStorage in the Twitter source code. I confess, DOM storage is unfamiliar to me and the Twitter JavaScript code is unreadable. So I don't sure they use localStorage to store the profile.
Question
Any hypothesis, infos or links about Twitter DOM storage / session storage?