Live data from Hacker News

Twitter to move away from Hashbangs

storify.com

21–30 of 82 posts

Re: Twitter to move away from Hashbangs

#21
post #3

Good. A lot of developers justified doing it in their own projects because Twitter and Gawker were doing it. Now that one of the headline sites is no longer using it (and will hopefully condem it) we can file this episode to history and never speak of it again. Edit: wouldn't it be awesome if Google (they did start this, afterall) would allow sites using hashbangs to auto-update all indexed URls

hash bangs and push state are essential for creating single page apps.

Re: Twitter to move away from Hashbangs

#24
I thought this was about twitter moving away from hashtags. For some reason I got a bit excited, may be because I find vast majority of hashtags to be annoying noise. That said, I know they serve a purpose in specific use cases and donno a better alternative.

Re: Twitter to move away from Hashbangs

#25
post #19
post #16

Earlier quoted context omitted.

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 th…

They could use the exact same setup they have right now.

They'd just serve the exact same (static) html for every twitter.com/username URL. I don't think it's exactly terrible Javascript hackery to look at the location.href and do an ajax call.

They'd probably support web crawlers with the same system they use now. And many web crawlers these days execute javascript anyway.

Re: Twitter to move away from Hashbangs

#26
post #24

I thought this was about twitter moving away from hashtags. For some reason I got a bit excited, may be because I find vast majority of hashtags to be annoying noise. That said, I know they serve a purpose in specific use cases and donno a better alternative.

Is it un/reasonable to consider moving hashtags out of tweets and into metadata or just separate?

Just as useful, but can be styled separately. Evolved hashtags, backwards compatible.

Re: Twitter to move away from Hashbangs

#27

Can somebody explain to non-web-types why this matters, other than making the URL itself look cleaner?

The fundamental problem is that when you use hashbangs, if you want the page "/#!12345" the server gets:

    GET / HTTP/1.1
And never knows what content the client is trying to access, until the client retrieves and processes client-side javascript. Then the client can request further information from the server. The theory is that you can make a "single-page" web-app that loads all of the javascript at once. Then went state needs to be updated, you can do it all from javascript. In practice, it didn't work as well.

Re: Twitter to move away from Hashbangs

#28
post #24

I thought this was about twitter moving away from hashtags. For some reason I got a bit excited, may be because I find vast majority of hashtags to be annoying noise. That said, I know they serve a purpose in specific use cases and donno a better alternative.

Hashtags were/are a Twitter user creation that they do very little to support apart from making them linkable within posts so they are easily searchable from their application interfaces.

Re: Twitter to move away from Hashbangs

#29

Can somebody explain to non-web-types why this matters, other than making the URL itself look cleaner?

And to expand a little on what mbreese said, the basic, fundamental idea behind the URL is for a client to indicate to a server what resource it's trying to access. So it's totally broken by that #!.

http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashB... is a great article.

Re: Twitter to move away from Hashbangs

#30

Can somebody explain to non-web-types why this matters, other than making the URL itself look cleaner?

It was hinted at in other comments, but when you go to http://twitter.com/#!/danwrong, what you're really doing is going to http://twitter.com/, processing a chunk of JavaScript that looks at what's after the #!, then loading up danwrong's page. This causes issues with search engines (the server has already told the crawler everything's OK, so how do you tell it the page can't be found?) and changing URLs (if you want to stop using hashbangs, you have to include an annoying piece of JavaScript on your home page forever).

So now, Twitter wants to get rid of the hashbang from its URLs because of— in part— the first reason, and it's currently dealing with the second.

Hope that explained a bit.

Post reply on HN