Data, Maps, Usability, and Performance

JavaScript Templating Frameworks and SEO

Last updated on April 28, 2013 in Development, SEO

JS Templating and SEO

JavaScript templating frameworks are gaining a lot of popularity these days. Client-side templating comes with many benefits: performance, clean separation of data and presentation tier, browser and/or CDN html caching, and much more like maximizing code reusability and maintainability. This is a great introduction on JavaScript templates. But, how do they affect search engine optimization? Today, I will dig into JavaScript templating frameworks, talk about some new players, discuss comparisons and benchmarks, and address the question of front-end templating and SEO.

Let’s start with a list of all the currently available JavaScript Templating Frameworks:

What have I missed? Some of these libraries will also work for NodeJS but here are some other server side JavaScript templating frameworks:

If you are interested in comparing these frameworks to each other, there are several good posts that cover this topic. These posts also cover benchmarking of these JavaScript frameworks.

But, how do does client side JavaScript templating affect SEO? The rendered HTML by the server will not have your data so a Google bot will not index the content of your page. I know that Google has the capability of indexing dynamic content but it is not that simple. The Google Ajax Crawling Scheme has some specific requirements and other search engines will still fail to properly index your content. There is also the accessibility consideration. There are still users out there with JavaScript turned off and they will not be able to see your content.

Consider an example. I have recently found Web Platform Tools website which does a nice job aggregating all kinds of tools for developers and designers. There are many pages and internal links so you would expect them to be indexed by Google but this is not the case as you can see this website is using a JavaScript template by checking the source. Lets take a look at Google:

Google only has the homepage indexed

Google cache only has HTML structure and no content

I think that client side templating is really only ideal for a rich single page application. Otherwise, I think the SEO considerations are more important than the benefits you get from js templating.

With that being said, you can always use any server side JavaScript templating solutions as they will not impact SEO.

Update:

This blog post does a good job of covering SEO for single page apps.

External:

JS Template Chooser

SEO And Accessibility With HTML5 PushState

HTML’s New Template Tag

Best Practices on JavaScript Templates

JavaScript Micro-templating

Tempo – the easy JavaScript rendering engine

pithy – internal DSL for generating HTML in JavaScript

Model-driven Views – write dynamic HTML using HTML

Tags: ,

Facebook Twitter Hacker News Reddit More...