Prerender.io
There are numbers of open source projects, which are trying to solve this issue while
only few of them are able to give satisfactory result. However, paid service like
Prerender.io seems to be quite a promising option for many businesses. Prerender.io
simply renders JavaScript in a browser, save the static HTML, and our application/server
returns that to the crawlers. If a crawler ever tries to access a page that isn't cached,
Prerender.io will render it on the fly and cache it afterwards. Furthermore, Prerender.io
also provides free service for saving up to 250 pages. (Prerender.io, 2015) Thus, we can
sign up for free service in Prerender.io and setup our server so that it will request for
static HTML from Prerender.io and return it whenever we get request from a crawler.
Once, our sample app is ready and running at server, we can simply follow the
documentation, which provides numbers of options and snippets depending on
platform we use. In our case, the sample application will be running in nginx server, so
we will configure it similar to Gist snippets provided by Prerender.io
(https://gist.github.com/thoop/8165802).
Ember-prerender and ember-cli-fastboot
In order to solve the particular issue in an Ember.js application, there is also a project in
GitHub named ‘ember-prerender’ (https://github.com/zipfworks/ember-prerender),
which makes use of Node.js and JSDOM, PhantomJS, or WebDriverJS depending on
our preference. However, we will need to run this service in our own server unlike
Prerender.io doing this for us. Unlike the Prerender.io Service, the goal of ember-
prerender is to reduce rendering times by utilizing a long-lived instance of an app instead
of reloading it on every request. In addition, we also get the flexibility of using JSDOM
or WebDriverJs instead of only PhantomJS. (Ember-prerender, 2015)
Main reason why we chose Prerender.io over ember-prerender is that the ember-
prerender project seems to be not very active project and, if we check commits history,
there is not much going at the moment. On the other hand, Ember.js core team is
actively developing an add-on ‘ember-cli-fastboot’ which has promised to solve not only
this SEO issue but also increase the efficiency of initial page load. There are still several
major restrictions we should be aware of and only the bravest should even consider
deploying this to production.