Live data from Hacker News

Twitter to move away from Hashbangs

storify.com

11–20 of 82 posts

Re: Twitter to move away from Hashbangs

#11
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

can't they just do a one-line .htaccess regex replace? or is it more complicated than that?

The redirection has to be done on the client-side, because the server never receives the fragment identifier as part of the URL.

Re: Twitter to move away from Hashbangs

#12
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

can't they just do a one-line .htaccess regex replace? or is it more complicated than that?

Nope, because anything after the # isn't included in the HTTP GET request made to the server - so a .htaccess-level redirection won't see it. You have to execute actual JavaScript on the client to read and redirect the #! bit.

Re: Twitter to move away from Hashbangs

#13
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

can't they just do a one-line .htaccess regex replace? or is it more complicated than that?

[deleted]

Re: Twitter to move away from Hashbangs

#14
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

can't they just do a one-line .htaccess regex replace? or is it more complicated than that?

That is the fundamental problem with hashbangs: the server receives "GET / HTTP/1.1" and the client uses javascript to render the hashbang. The server has no idea a hashbang is present until after it sends javascript to run client-side.

Re: Twitter to move away from Hashbangs

#15
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

can't they just do a one-line .htaccess regex replace? or is it more complicated than that?

[deleted]

Re: Twitter to move away from Hashbangs

#16
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

It doesn't sound like they're switching to rendering on the backend, though. So you're most likely still going to have to execute a huge chunk of javascript before displaying the page, though hopefully it will get faster.

Re: Twitter to move away from Hashbangs

#17
post #4

The actual URL for the informative blog post is this: http://danwebb.net/2011/5/28/it-is-about-the-hashbangs The linked blog post only contains some relatively meaningless Twitter messages and the hyperlink as text, not as an actual link. One of the things the post doesn't mention (it's sort of implicit in "going under the radar") is that with hash bangs, every request has double the round trip time to retrieve the i…

No. That link is to an OLD blog post explaining why Dan Webb (and many other people) think hashbangs are bad idea.

The actual news here is that Twitter is moving away from them, which is very new and welcome news. That link is only useful for general background on the hashbang argument; it's otherwise irrelevant.

Re: Twitter to move away from Hashbangs

#18
post #16
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

It doesn't sound like they're switching to rendering on the backend, though. So you're most likely still going to have to execute a huge chunk of javascript before displaying the page, though hopefully it will get faster.

Dan doesn't say anything about where the rendering will happen.

Most sites these day (including Facebook, Gmail, etc) have to execute "a huge chuck of js" before displaying the page.

I have been told by some people in the know that they have come up with a system similar to pjax for certain page components, though that may have changed.

Re: Twitter to move away from Hashbangs

#19
post #16
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

It doesn't sound like they're switching to rendering on the backend, though. So you're most likely still going to have to execute a huge chunk of javascript before displaying the page, though hopefully it will get faster.

Wouldn't they have to, to support browsers without pushState? And even if they used terrible JavaScript hackery to get around that (serve same content for every URL, have clients AJAX in content based on location.href) how would they support web crawlers? I thought the whole point of the hashbang was that you would get the original content (or an equivalent representation) by removing it from the URL, so I'd think they still support backend rendering at some level.

Re: Twitter to move away from Hashbangs

#20
post #16
post #2

This is fantastic news. From the recent tweets by https://twitter.com/danwrong it looks like Twitter are moving entirely to HTML5 pushState, and leaving IE users with full page refreshes rather than continuing to serve them #! - Dan says "I'm not sure why everyone is so adverse to page refreshes these days. You can make them fast too." Of course, Twitter are going to have to include a piece of JavaScript on the http:…

It doesn't sound like they're switching to rendering on the backend, though. So you're most likely still going to have to execute a huge chunk of javascript before displaying the page, though hopefully it will get faster.

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.

Post reply on HN