Hash fragments

by graham

Trends are great. They're good to keep up with, experiment with and - especially with digital agencies - pretty cool to get into a new project, even if the client is locked into IE6 by their IT department and can't see it. 

Now and then a trend isn't great. It's just wrong. 

And sometimes a trend makes no sense. That makes it stupid. 

For a long time Google has tried to index dynamically created content on sites and found that, although it could with query strings, they didn't like what they considered "ugly URLs" so they've come up with a specification for hash fragments

In Twitter's latest redesign they have adopted this so now every URL begins with twitter.com/#!/. Which, to me, is an ugly URL. As Mike Davies recently put in his post Breaking The Web With Hash-bangs, it is also very prone to errors. 

Putting aside the fact that other search engines as well as social media sharing APIs don't currently recognise these URLs we have two very clear issues. 

1, As Google state in their doc:  "Should the content for www.example.com?_escaped_fragment_= return a 404 code, no content will be indexed for www.example.com! So, be careful if you add this meta tag to your page and make sure an HTML snapshot is returned."
Which should be worrying enough for anyone maintaining a large or CMS driven site. 

2, This lean to reliance on JavaScript to serve up content falls flat if you don't cater for JavaScript being disabled or failing to load altogether. 

This should raise concern in any developer, especially as you site could fall out of Google's search listing altogether or not even be fully index by Yahoo! or Bing. 

Progressive enhancement is the key to serving any content on the web, with JavaScript adding a nice interaction layer at the top rather than being required to serve content. 

Comments are closed