test.ical.ly | getting the web by the balls

May/12

31

No more hashbangs! Twitter is moving rendering back from the browser to the server

What was revealed in a twitter discussion before is now official – twitter decided to move back the frontend rendering from the browser to the server again thus removing the hashbang (#!) in URLs. This is quite a big architectural change.

All done for performance reasons.

It’s all about the time to first tweet.

With the hashbang URLs browsers needed to load a lot of generic javascript, then interpret the URL and only then request the appropriate data for the page requested and render it.

Removing the hashbang and doing the rendering on the server again apparently improved the initial page load time to 1/5!

The second big change is the arrangement of their javascript code. Apparently they use CommonJS and AMD to describe dependencies between modules in each module so the application can load asynchronously only what is needed.

I’m looking forward to see this new architecture being rolled out completely to see if the user experience will improve as promised.

·



  • http://www.beryllium.ca/ Beryllium

    I read this blog post recently, on a related topic: http://caines.ca/blog/programming/the-sun-is-setting-on-rails-style-mvc-frameworks/

    It seems like Twitter’s choice to partially regress to a thinner client experience is a good compromise between the perspectives of full-on client-side rendering versus full-on server side rendering.

  • http://test.ical.ly Christian

    @Beryllium thanks for the link! It’s an interesting read although I don’t agree at all with templating being not a server side job. Twitter probably found a good compromise as you say.

<<

>>

Theme Design by devolux.nh2.me