Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Backbone.js app be progressively enhanced, and crawlable by search engines?

I need to implement an MVC JavaScript framework for my next project, but it's as much as a website as it is a web app. Is it possible to expose the data server-side, then parse the URL to show the 'JS version'?

(I plan on using Rails for server-side code)

like image 915
joecritch Avatar asked Oct 18 '11 09:10

joecritch


1 Answers

I wrote a small blog series on exactly this subject...

The first part introduces the problem and the previous solutions, as well as the current solution: HTML5's PushState (history API)

http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-1-introducing-pushstate/

Part 2 shows how to use progressive enhancement with Backbone, so that when you have your server render HTML you can then have your Backbone code take over the existing HTML content instead of rendering new content:

http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/

Part 3 is a (slightly blurry) video of a presentation I gave on this subject, at a conference:

http://lostechies.com/derickbailey/2011/10/06/seo-and-accessibility-with-html5-pushstate-part-3-the-video/

And while it's not directly a part of this little series, I also wrote a blog post about using Routers with PushState. The gist of that post is: you don't need a router:

http://lostechies.com/derickbailey/2011/10/17/tips-for-using-backbone-js-routers-with-html5-pushstate/

Hope that helps

like image 170
Derick Bailey Avatar answered Sep 20 '22 12:09

Derick Bailey