Last Updated: February 25, 2016
·
462
· roieki

SPAs and SEO: How to make it work

An SEO solution for SPAs (mostly MEAN SPAs)

Mean-SEO is an Express.js middleware, and it intercepts requests that include an escaped fragment reference in the URL. We include a special meta tag that tells it the crawler to query our Angular pages again, using the escaped fragment reference.

Mean-SEO then launches a Phantom.js headless-browser, which then fetches the same page, but makes sure to wait for a while, before serving the fully rendered page back to the server.

This allows the crawler to get the our content after our Angular app is fully loaded, and the search engine could then index the page content, even if it requires resolving AJAX requests etc.

http://github.com/meanjs/mean-seo