Question

I am building my website with backbone js application framework and I am changing the urls with the html5 push state. All the content is being rendered through the js and basically the dom is more or less empty before the page render method (there is just a core structure without any content). I assume that this is very bad for search engines, because bots won't crawl the actual content of the website.

So is there any workaround or I will have to render the content with some server side technology on the first init? I am really hoping that's not the only option, because I already have the complete logic, models, templates and everything written in js...

I've heard that phantom.js can do this job? Would it be easier to accomplish that using node.js for server side scripting?

Was it helpful?

Solution

So is there any workaround

No

or I will have to render the content with some server side technology on the first init?

The point of using pushState and having real URLs is that it lets you failover to server side technology (and to generating initial views using server side, which is usually faster then doing loading a default view in JS and then changing it after making extra Ajax requests).

I've heard that phantom.js can do this job?

I support you could use phantom.js to look at the URL, request the initial page, run the JS needed to change it to the page at the specified URL and then server that up… but it sounds like a pretty inefficient solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top