The redesigned twitter.com logged-out homepage was progressively launched last month! Along with the new signup page, it is among the user-visible things I’ve been working on at Twitter. And it contains a few cool JavaScript & CSS tricks. I thought I’d write some of them up for posterity.
First of all, the homepage acts as a loader for #newTwitter logged-out. This means that after the page shows up in your browser, we continue loading data and cache it for further use. You can tell the background loading is complete when the Languages links appear at the bottom of the page. At that time the webapp is active, and all #newTwitter functionality is enabled. For example, you can use the “g u” keyboard shortcut to open a navigation modal.
With a fast connection, one may see the page loads almost instantly. On slower connections, users can still view and use the page (clicking on links, filling out forms) before loading is complete. This is achieved by embedding a micro-framework in the page, just enough to enable the cross-browser placeholders over the input fields and hook up some analytics.
Once the app is loaded, the initial 30 accounts in the avatar strip will be repeated as needed to fill up any window width, up to 2600px. The selection of accounts featured and their rotation is random, but designed to keep repeated avatars as far from each other as possible. CSS goodies: The placeholder use transitions. The background pattern is in a data URI, with a fallback for IE<8. The halo around the signup area is a gradient. The avatar strip uses webkit-box-reflect.
Lots of people had a role in this project, but essentially the page was designed by Vitor Lourenço and developed by yours truly. It leverages the #newTwitter work by @k, @stop, @bcherry, @ded and many others. The async javascript dependency manager is actively being developed by @danwrong.
The page was initially released to the general public on April 5th, 2011. Sadly an unrelated bug surfaced, causing all #newTwitter features (including this homepage) to be turned off. The new homepage had to be taken down after only a few hours, but was up long enough for us to collect valuable performance data, and to observe the overwhelmingly positive initial reactions from users and the press. On the 20th, after a couple bugfixes and optimizations, the page was re-enabled for all users. It’s interesting to see the spikes in tweets mentioning twitter home page for the month of April, they logically match up with the releases.
Twitter.com homepage press coverage:
As your reward for reading this far, I hereby bequest onto thee the knowledge of a easter-egg in said homepage. Go there, hold down ALT and SHIFT on your keyboard, and click on the bird in the Twitter logo in the top left. Admire as the avatar strip is taken over by aves. Something else will happen if instead of ALT-SHIFT-clicking the logo, you ALT-SHIFT-click the area over the city featured in the header of this blog.
Eventually, I’ll post about the other twitter.com pages I’ve been working on but that may not have been noticed as much – the revamped signup and login pages.
Thanks for reading!