Hacker News new | past | comments | ask | show | jobs | submit login
JQuery BBQ: Back Button & Query Library (benalman.com)
57 points by gspyrou on April 9, 2010 | hide | past | favorite | 3 comments



I've been using the jQuery Address plugin which seems to do the same thing: http://www.asual.com/jquery/address/

Such deep linking also needs to be combined with a progressive enhancement approach: each deep (hash-based) link must have a "non-deep" equivalent.

On my site, for example, both of these URLs point to the same "state":

http://alikewise.com/Profile/FounderGuy/Book/42

http://alikewise.com/Profile/FounderGuy#/Book/42

The first one is SEO-friendly, and also friendly in non-JS situations. The latter allows for a nice ajax experience.


I do the exact same thing with multiple sites, using Asual's address plugin (which I love, btw... it also integrates with G Analytics perfectly). The only difficulty I have is getting people to use the non-hashed links instead of just copying what's in the address bar. Google treats all of the hashed links as the same link (everything up to the hash mark).

The other problem is people end up copying URLs like: http://alikewise.com/Profile/FounderGuy/Book/42#/Book/43

(edit: I noticed your site automatically forwards to the hashed version, which I also considered -- but it breaks the back button!)


I could have used a plugin like this back when I would write scripts that polled to see when the #hash had changed in the document.location.

Plugins like this are great for SEO if you want your users to be able to link to different sections of content while one URL garners all the 'link juice'.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: