News for hackers. Stuff that matters.
Re:Twitter to move away from Hashbangs by simonw on Monday February 20, 2012 @05:47PM (#3614301)
I'm hoping that they plan to serve up the HTML and CSS for the basic page as quickly as possible, then load the JS that adds the pushState / interactive stuff asynchronously.

A page with a single tweet on really shouldn't need to pull down much code. The JS can all be cached by the browser (far future expires headers etc) and there are some neat tricks you can do with app cache and localStorage to make that work even better.

Re:Twitter to move away from Hashbangs by Isofarro on Tuesday February 21, 2012 @03:29AM (#3615721)
IIRC, Twitter brought in Steve Souders as a consultant for improving the performance of the Twitter web interface and the main recommendation he offered was to have the tweet content in the HTML page instead of loading them dynamically.
Re:Twitter to move away from Hashbangs by mvzink on Monday February 20, 2012 @07:08PM (#3614528)
Indeed, one always hopes they do the right thing :P
Re:Twitter to move away from Hashbangs by n8agrin on Monday February 20, 2012 @07:31PM (#3614604)
This is what they do.
Re:Twitter to move away from Hashbangs by davej on Monday February 20, 2012 @09:15PM (#3614898)
Nope.

At the moment if you go to https://twitter.com/#!/twitter then it loads up the HTML for https://twitter.com/, if you're logged in it will be the tweets of those you follow. Then the javascript magic loads in @twitter's profile dynamically.

PushState will allow twitter to load in the static HTML for @twitter's profile at https://twitter.com/twitter/ and then progressively enhance it with javascript. The net gain will be that the page will be available much faster on initial page load.

Re:Twitter to move away from Hashbangs by n8agrin on Tuesday February 21, 2012 @02:17AM (#3615551)
Well, you're right and you're wrong. I'll be specific, since you are:

Twitter is sending down the home timeline as HTML. In fact, what most people are looking for when they go to twitter.com is their home timeline so I'm correct, this is what they are doing (at least in new-new-twitter which I think almost everyone now has). You're also correct, when you go to twitter.com/#!/n8agrin you get your timeline in the background which is then replaced with my tweets. However it wasn't always this way. At one point in time, going to twitter.com just downloaded a bunch of javascript and an HTML bootstrap. The whole site was generated by javascript. I know this because I worked on it.

Technically pushState doesn't really have anything to do with the practice of progressive enhancement or making anything "much faster". You can make pure javascript sites very fast, you can make serving straight up HTML very fast, you can progressively enhance HTML without pushState. pushState is really just a way to manipulate the history of a browser, while optionally changing the browser's current url, without a page refresh (read more here: https://developer.mozilla.org/en/DOM/Manipulating_the_browse...). You can use it to do a lot of things, one of which is to have it serve as one part of a solution for sites that behave like single-page apps without having to resort to the fragment identifier (http://en.wikipedia.org/wiki/Fragment_identifier), forever vilified as the hashbang.

Re:Twitter to move away from Hashbangs by fanf2 on Tuesday February 21, 2012 @02:50AM (#3615620)
IME I get my timeline flashing up in the foreground (not background!) before the actual content I want appears. Wastes a second or two.
Re:Twitter to move away from Hashbangs by nfriedly on Monday February 20, 2012 @07:49PM (#3614643)
Woop, sorry I downvoted you.
Re:Twitter to move away from Hashbangs by bcherry on Monday February 20, 2012 @10:16PM (#3615068)
this will certainly happen, at least in the places it will be most useful.