Ad

Angular And SEO - Creating Static HTML Version

I'm about to start an Angular app and I'm looking into how to make it SEO-friendly. I've been reading this article which talks about saving a static version of the dynamically-generated HTML (via AJAX etc) and having the bots scan that.

The article talks about how Google/Bing, on finding a hashbang URL like

http://somesite.com/#!/some_token

...redirect to and crawl

http://somesite.com/?_escaped_fragment_=/some_token

Two questions arise:

1) What the hell is that _escaped_fragment_= - should it literally be that or should I replace that with... something? The article doesn't explain its nature.

2) How, and how often, should I take a static snapshot of my HTML?

In a previous project of mine, docula.net, I snapshotted the JS-generated content manually by passing a query string token, which invoked a dump of the DOM to a PHP save script over AJAX. Is that the gist of how you would SEO-ify an Angular app, or should the process somehow be more automated?

Ad

Answer

What the hell is that _escaped_fragment_= - should it literally be that or should I replace that with... something?

It should be exactly that.

Personally, I'd avoid using hash bangs as they are a horrible hack. These days we have pushState and friends which means we can use real URLs.

How, and how often, should I take a static snapshot of my HTML?

I'd avoid using static snapshots in favour of dynamically generating the content on demand.

Ad
source: stackoverflow.com
Ad