Javascript apps can be fully crawlable
This is a great approach, but detecting the user-agent is the wrong way to decide if you should pre-render the page. If you include the following meta tag in the header:<p><pre><code>   <meta content="!" name="fragment">
</code></pre>
then Google will request the page with the "_escaped_fragment_"  query param. That's when you should serve the pre-rendered version of the page.<p>Google has documentation on this here: <a href="https://developers.google.com/webmasters/ajax-crawling/docs/html-snapshot" rel="nofollow">https://developers.google.com/webmasters/ajax-crawling/docs/...</a> and we've been using this method at <a href="https://circleci.com" rel="nofollow">https://circleci.com</a> for the past year.<p>Waiting for google to request the page with _escaped_fragment_ should also prevent you from getting penalized for slow load times or showing googlebot different content.