Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets say I have a link:

<a href="/about/">About Us</a>

But in Javascript [or jQuery] catches it and then adds the hash based off of the href attribute:

$('a').click(function(e) {
    // Extremely oversimplified..
    window.location.hash = $(this).attr('href');

And then we use a hashchange event to do the general 'magic' of Ajax requests. This allows for the actual href to be seen by crawlers, but gives client-side users with JS enabled an ajax-based website.

Does this 'help' the general SEO issues that come along with hashtags? I know hashbangs are 'ok', but afaik they aren't reliable?

share|improve this question

migrated from stackoverflow.com Jun 27 '12 at 11:49

This question came from our site for professional and enthusiast programmers.

What would a non-JavaScript crawler do? Because that's what they generally do... google has a method published to crawl "#!" content, which might be worth investigating. – pst Jun 25 '12 at 23:05
@pst Right. So then is it 'best practice' to use hashbangs [#!] and keep the URL's, in the source, static? – Talasan Nicholson Jun 25 '12 at 23:08
If your links are not static in the page then the vast majority of web crawlers will miss them because they simply send an HTTP GET request and then parse the HTML they receive. Here's Google's guide on the topic, they seem to be the pioneers in this domain: developers.google.com/webmasters/ajax-crawling/docs/… – Alex W Jun 25 '12 at 23:12
up vote 1 down vote accepted

Yes, this is search engine friendly and a good example of progressive enhancement. Because the links are still crawlable and load the same content as with JavaScript so Google, and any user without JavaScript enabled, can still find the content just fine. Your users with JavaScript will get the added benefit of a faster page load since they don't need to wait for the whole page to load when they click the link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.