Is JavaScript SEO useful and should you do it?

22.05.2019 450 0

The battle for attention online is never-ending. And with the competition constantly evolving and growing, websites try to find any possible advantage to keep themselves on the good side of search engines. This includes a lot of Search Engine Optimization (SEO) techniques, including JavaScript SEO.

It’s not a new practice by any stretch, but it’s for sure drawing more and more interest these days. It’s a more complex topic than regular SEO, but the benefits of it can be worth exploring. With that said, JavaScript SEO is not a universal solution and definitely not for all cases.

What is JavaScript SEO?

In short, it’s optimizing the content which is rendered via JavaScript (JS) on a website and making sure it all runs properly and is indexed by search engines. It also takes into account some JS specifics like Server side rendering (SSR) and Client side rendering (CSR).

SSR is the traditional method. Here all of the page’s resources are on the server and it will do all the work to render the page when it’s requested.

CSR is the newer method. Here a JS framework transfers the rendering load to the client side, i.e., the browser. It has more requests to the server as opposed to the SSR where everything is handled in one go.

As a result, SSR may be faster, but that depends on the connection speed, server load, page optimization and so on. CSR, on the other hand, might be a touch slower initially, but after the resources are downloaded, the rest of the rendering happens faster and is not impacted by server loads and so on.

Search engines, mainly Google and Bing, can crawl and render JS. So, it’s tempting to start SEO-ing everything via JS. Making your JS content well-structured, organized and rendering properly shouldn’t be done only because of the search engine bots. It should be the very basis of a JS site.

Is JavaScript SEO vital?

It depends on your goals. If you have a JS-heavy site, then yes, it’s a no-brainer to make sure it’s SEO-ed well. But if JS doesn’t really have a big or any role on your site, then there’s no real reason to start using it more just for the hope that it will increase your page rank.

Google’s John Mueller, one of the most prominent people who talks about SEO, says that JavaScript will eventually become more and more important over the next few years. In a Reddit Q&A he says that “If you’re keen on technical SEO, then past HTML you’re going to need to understand JS more and more”. On the other hand, Google has focused less on JS in its AMP and Progressive We Apps projects.

For search engines JS content is still relatively difficult to read and crawl. They can do it, but it can take time. Sometimes they do a basic initial crawl and when they come across JS content, they come back later with more resources to render and crawl the JavaScript portion. So, if fast ranking is your goal, a JS-heavy website might not be the ideal solution for you, even if the SEO is top-notch.

If your aim is long-term ranking and page reputation, then a well built and optimized JavaScript site is a good option. But you will have to spend a lot of time and effort to make sure everything is right.

A few JavaScrtipt SEO tips:

  • Make sure the content can be indexed within the load event
  • Don’t index content which depends on user events or actions
  • The HTML and JavaScript versions should not contradict each other
  • The best HTML SEO practices apply to JS, too
  • Every site, including JS sites, requires unique URLs which are indexable
  • Don’t forget the meta data, title, ALT tags for images, they still count
  • Make sure there are no pushState errors as they can result in duplicate content
  • Href- and scr- attributes still matter a lot
  • Don’t forget robots.txt and make sure bots are allowed and JS is not excluded

Leave a Reply

Your email address will not be published.