Reading Time: 2 minutes

Simply put, because your use of JavaScript leaves a lot to be desired.

When a search crawler lands on a page, it CAN process javascript, however, the process is very “expensive” as my good friend Ragil explained to me. Often the crawler will simply leave before processing all your valuable content.

The use of javascript is good and should be encouraged where appropriate, but if there’s another way of achieving the same result without using javascript, why not do it that way instead?

Just because you use some new fancy framework or found a way that seems to work, doesn’t mean it’s the right way of doing it in every situation.

Ultimately you should be thinking about how everything you do can functions (or doesn’t function) when javascript isn’t enabled at all!

Let me give you an example.

This tweet from John Mu (credit to Kristine Schachinger for the original question) highlights a really common issue that drives technical SEO guys and girls crazy.

If you want to place a link on the page, you can do so with javascript using the “onclick” event and it will technically work, but this isn’t going to be picked up by a crawler!

In fact for an SEO, you are robbing the crawler of the opportunity to understand the flow/journey of your website from an internal linking point of view.
So why not just insert static HTML into the page and allow the link to be followed, to show where you want to send the user to.

Should javascript not be enabled you will still get some benefit from this link as opposed to no function whatsoever.

If there’s no need for your link to be dynamic in any way, then there’s no need to use anything other than static code. Accessibility is key and we need to not just think about how WE experience a particular page but rather how EVERYBODY else is going to experience that page.

Javascript is a very powerful tool, but with great power comes great responsibility, and your responsibility is to ensure that you make what you create as easy as humanly possible for BOTH humans and machines to read.

If you follow the K.I.S.S rule (keep it simple stupid), you will create fewer issues for your local SEO heroes to hate you for and one day, maybe years from now, they might actually stop hating you.