this post was submitted on
10 points (91% like it)
11 up votes 1 down vote
all 6 comments

[–]D__ 5 points6 points ago

sorry, this has been archived and can no longer be voted on

If you use the # symbol, everything after it becomes a so-called fragment identifier. One of the advantages of putting requests in a fragment identifier is that you do not force the browser to reload the page it's currently on. This is evident if you use anchors in a document (demonstrated in tables of contents for Wikipedia articles, for example).

You can also write some javascript to handle such links. This allows you to have one page with a bunch of javascript. Your javascript looks at the fragment identifier passed in the URL, and takes action based on what it sees - for example, fetching a given article by using AJAXy magic. You can contrast that with your usual ?article=blah method of passing parameters: the usual method gives parameters to the server, and so asks it to serve a dynamically generated page depending on the parameter; on the other hand, the fragment identifier method (#!blah) involves using javascript in the user agent, which requests resource blah from the server and incorporates it into the displayed page on client side.

The use of hashbangs has one advantage, if you're going to be using a lot of AJAX. Whenever your browser encounters a new fragment identifier, even if it does not actually reload the URL, it puts a new entry in your history. This means that with fragment identifiers, the user can press back to get to the previous fragment identifier - and so you can have javascript that handles back button presses without leaving the page.

Of course, the bigger question is: should you be depending so much on javascript. The "progressive enhancement" approach to web design tells you to use the basics for your content and then offer javascript to enhance it. If you're gonna be using javascript just to serve any content, you might run into some problems - like the ones that Gawker was battling with.

[–]zaneyhaney54 4 points5 points ago

sorry, this has been archived and can no longer be voted on

The issue is that they're using Javascript to fetch ALL of the content on the page, and that they aren't providing a canonical way for browsers, crawlers, etc, to follow links. There are ways to use AJAX without breaking convention.

[–]Iainzor 5 points6 points ago

sorry, this has been archived and can no longer be voted on

It's not bad that they use them, it's bad that they don't use Javascript to interrupt hyperlinks and convert the path to a hashbang. This is what these blogs have been talking about at least. I don't use twitter so I couldn't tell you exactly what they do.

Also, just because a popular site does something doesn't mean it's the correct way of doing it.

[–]tdooner 1 point2 points ago

sorry, this has been archived and can no longer be voted on

These companies know what they're doing. There is a considerable speed advantage gained by loading a page's content dynamically with javascript. Since most users on the internet today have JavaScript turned on, it's a good bet.

Now, it's probably ill-advised to jump on the bandwagon and use them for a personal site (or any site that doesn't need the immediate responses), but there is nothing (in my opinion) intrinsically wrong with them.

[–]nemec 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Google "came up" with hashbangs as a hack to allow Ajax content to be indexed. as D__ said above/below, it's basically an abuse of anchors to allow access to pages previously only accessible with Javascript.

It's not a Bad Thing in and of itself. The Bad Thing happens when you transfer content management to 100% hashbangs - without javascript, the page no longer renders. If you want to render it, instead of the "user friendly" url page.php?id=1, you have to navigate to page.php?_unescaped_fragment_=id/1/ or something.

It looks terrible. Twitter uses it so that you don't have to refresh the entire page when loading new tweets. On the other hand, I'm pretty sure Twitter is usable without Javascript. Gawker, on the other hand, transistioned completely to these new urls and away from conventional ones, leaving non-javascript browsers completely locked out from viewing content. This is really the main reason why everyone's so up in arms now, despite the fact that Twitter and Facebook have been using them for a while.

[–]arbostek -2 points-1 points ago

sorry, this has been archived and can no longer be voted on

I haven't seen those new style Twitter URLs, so maybe they stopped?

Have you seen the recent links on this topic? For example Tim Bray's post and yet another good post?

Is there anything in particular you don't understand, given the arguments and reddit discussion, etc.?