pushState's SEO issues.
Backbone.js 0.5.0 Released (with pushState)
21–30 of 38 posts
Re: Backbone.js 0.5.0 Released (with pushState)
#22http://stackoverflow.com/questions/6193858/pushstate-and-seo pushState's SEO issues.
Re: Backbone.js 0.5.0 Released (with pushState)
#23Earlier quoted context omitted.
May be a chrome bug[0] or a spec bug/weirdness[1]. See edit, try checking for the state attribute on your event object to filter out spurious popstate events. An other option would be to use a shim library (History.js) handling that kind of crap (and smoothing out implementation details issues) for you. [0] http://www.google.com/support/forum/p/Chrome/thread?tid=28ed... [1] http://hacks.mozilla.org/2011/03/history-ap…
Yep, I was doing it wrong. You're supposed to pass a state object as the first parameter, I was passing null. So this fixes 2 things, prevents me from having to do XHR on initial page load AND I don't need to do an XHR on back/forward navigation either, I can just use the state object to store my data. Awesome!
Re: Backbone.js 0.5.0 Released (with pushState)
#24http://stackoverflow.com/questions/6193858/pushstate-and-seo pushState's SEO issues.
Of course that's a bit harder since your views need to respond in a different manner to casual GETs and AJAX requests.
Re: Backbone.js 0.5.0 Released (with pushState)
#25http://stackoverflow.com/questions/6193858/pushstate-and-seo pushState's SEO issues.
Or you could use progressive JavaScript, AFAIK. Make your every link a first class citizen (with it's own view) and for supported browsers replace links' default action with content switching (without reloading) using JS requests. Of course that's a bit harder since your views need to respond in a different manner to casual GETs and AJAX requests.
Re: Backbone.js 0.5.0 Released (with pushState)
#26http://maccman.github.com/spine/
Anyone else know anything about this?
Re: Backbone.js 0.5.0 Released (with pushState)
#27I read somewhere that Backbone was being dropped for Spine. http://maccman.github.com/spine/ Anyone else know anything about this?
Re: Backbone.js 0.5.0 Released (with pushState)
#28I read somewhere that Backbone was being dropped for Spine. http://maccman.github.com/spine/ Anyone else know anything about this?
In all seriousness, Spine is Alex MacCaw's rewrite/re-imagining of Backbone for his O'Reilly book: http://jswebapps.heroku.com/
The broad strokes are roughly the same, but the internals work differently. I'd suggest you look at what both libraries have to offer, and pick whichever suits your fancy. The benefits accrued by your application should be similar in both cases.
Spine doesn't depend on Underscore.js, but also doesn't benefit from Underscore's rich collection functions. If you'd like to each, map, filter, find, reject, every, some, invoke, include, sortBy, without, or pluck over your models, try Backbone.
If Backbone looks too bewildering at first glance, Spine may be easier to start with: the documentation is certainly better geared for beginners.
Re: Backbone.js 0.5.0 Released (with pushState)
#29I'd be curious to hear from anyone who thinks that this sort of parallel hashchange/pushState support is a bad idea. It should prove to be controversial at the least. * http://www.documentcloud.org/public/#search/guantanamo * http://www.documentcloud.org/public/search/guantanamo People who don't care much about Internet Explorer support often say to just use pushState, and let IE users endure full page refreshes ...…
Those two URLs don't result in the same behaviour. After clicking the first, you have to click back three times to go back to the current page. This would surprise most users.
https://github.com/documentcloud/backbone/commit/c39ddd0c16e...
Now, if you click on the first link, and then go back once, you should end up back here.
Re: Backbone.js 0.5.0 Released (with pushState)
#30Earlier quoted context omitted.
Or you could use progressive JavaScript, AFAIK. Make your every link a first class citizen (with it's own view) and for supported browsers replace links' default action with content switching (without reloading) using JS requests. Of course that's a bit harder since your views need to respond in a different manner to casual GETs and AJAX requests.
Which really should be trivial using most modern 3-Tier frameworks. They universally have a concept of "layout" vs "template" so in a pseudocode logic, all you need to do is tap into the render method and swap out an empty layout when responding to an XHR request.