News for hackers. Stuff that matters.
Re:It's About The Hashbangs by FixYourLogIns on Tuesday May 29, 2012 @11:00PM (#4041168)
It would be nice to have a little background on exactly what "hashbangs" do and why they are used.

Then it would be nice to have some background on what pushState is (or will be) and what its purpose is.

Re:It's About The Hashbangs by lloeki on Wednesday May 30, 2012 @01:50AM (#4041578)
Also I find it unfortunate that of anything they used the same term as the oft-used Unix program loader feature.
Re:It's About The Hashbangs by wisty on Wednesday May 30, 2012 @01:12AM (#4041474)
pushState is a way of going to a new page within a site without reloading everything. If you go to twitter/posts/1 to twitter/posts/2, then all the HTML and the twitter assets (images, css, javascript files, etc) will be reloaded. (OK, there's caching, but ... it can still be slow).

pushState lets you rewrite the bits of the page you want to change using javascript, without reloading anything inessential.

Hashtags do the same thing, because technically, hashtagged urls (twitter/posts#1 vs twitter/posts#2) are on the same page. It's a way of changing the URL in the address bar without technically changing the page.

Re:It's About The Hashbangs by DavidAbrams on Wednesday May 30, 2012 @05:32AM (#4042072)
Thanks!
Re:It's About The Hashbangs by wisty on Wednesday May 30, 2012 @11:44PM (#4046244)
OK, in retrospect that was confusing.

Both hashtags and pushState are ways of changing the page and the URL using Javascript. pushState is the "legal" way, which changes the page's URL (i.e. twitter/posts/1 -> twitter/posts/2). hashtags technically don't change the page, they change the part of the URL after the hash (i.e. twitter/posts#1 -> twitter/posts#2).

hashtags are used because older browsers don't let you use pushState. pushState is used because it's more correct, and doesn't exploit a hacky loophole.

Both are used because they are faster than a whole new page request, and they let you share the post by cutting and pasting the URL in your address bar.

Re:It's About The Hashbangs by verisimilitude on Wednesday May 30, 2012 @09:12AM (#4042621)
I explained them in a post about a year ago: http://tumbledry.org/2011/05/12/screw_hashbangs_building which was discussed here: http://apps.ycombinator.com/item?id=2592741