With pushState not widely implemented, you have three choices: 1) don't use AJAX in response to actions that alter the page content in a significant way. This of course forces page reloads and prevents the cool emerging pattern that is to not serve dynamic HTML but just have a REST API and do the rendering client side. 2) you do the ajaxy stuff but you don't touch the URL. This leads to a nonworking back button and p…
I've proposed sort of possible solution here, in a related discussion: http://news.ycombinator.com/item?id=2197064
Broken Links
61–70 of 95 posts
Re: Broken Links
#62Earlier quoted context omitted.
It's really great that in a few years, browsers will support a new AJAX technology that solves this problem that we wouldn't even have with sane, traditional URL schemes.
Maybe you're trying to be snarky, but I'll choose to take your comment seriously. The AJAX approach to Web apps does provide a genuine user interface benefit. A full page load is very disruptive to application flow, and being able to have new data appear without incurring that penalty is great. Most of the time you only need to load a little bit of data anyway, and it's wasteful to reload all the markup that wraps it…
On many examples I don't see any real disruption to application flow with just using normal links, though there are more full-fledged webapps (like gmail) where I would agree. Playing around with old v. new Twitter, the old one actually has considerably faster navigation performance, at least on my setup (and I'm using a recent Chrome on a recent Macbook Pro). Sure, some HTML header/footer stuff is being retransmitted, but it's not very big.
Re: Broken Links
#63Earlier quoted context omitted.
two problems 1) The link is weird and confusing in the first place, /shop/shoes#!shop/socks refers to two different resources 2) The server will already have done work to find the shoes, when the javascript redirects to the socks page.
1.) Is a limitation of Google's crawlable Ajax proposal. That would probably not have occurred with a proper standards body. What sequence of events would have to happen to have that as an inbound URL? I sense some previous JavaScript would have to have failed to allow that scenario. 2.) The site is already paying this price by redirecting _escaped_fragment_ URLs, and the old clean style urls. All inbound links will…
Re: Broken Links
#64May be I'm missing something, but it seems to me that there is a way to have your cake and eat it too in this case.
Say we have a site with a page /contacts/ which lists various contacts.
Re: Broken Links
#65Earlier quoted context omitted.
A while back, there was this pie-in-the-sky idea which was really interesting but not too practical, called Semantic Web. It didn't really pan out because it turns out that annotating your sites with metadata is boring and tedious and nobody really liked to do it, and anyway, search and Bayesian statistics simulated the big ideas of Semantic Web well enough for most people. The ideas behind it still stand, though, in…
Ah, but the #! is probably just using JS to access a well-defined API - the same API which anyone else can access in completely uncluttered, machine-readable form. So perhaps the solution is for every #! page to have a meta tag pointing to the canonical API resource which it is drawing data from. Bingo, semantic web!
Re: Broken Links
#66Re: Broken Links
#67Re: Broken Links
#68Earlier quoted context omitted.
I tried both curl and wget last night (neither of these are HTML5-ready browsers), and neither of them could get content using the hash-bang URL. They both came back with an empty page skeleton. Also, how do you reassemble the hash-bang URL from HTTP Referrer header?
Neither curl nor wget follow the Google convention for handling hashbangs as suggested by the parent, so I'm not sure what you're getting at with this reply.
In this context hash-bang urls are broken.
Re: Broken Links
#69Earlier quoted context omitted.
1.) Is a limitation of Google's crawlable Ajax proposal. That would probably not have occurred with a proper standards body. What sequence of events would have to happen to have that as an inbound URL? I sense some previous JavaScript would have to have failed to allow that scenario. 2.) The site is already paying this price by redirecting _escaped_fragment_ URLs, and the old clean style urls. All inbound links will…
no, with google's proposal, the #! links are all from the site root, see Lifehacker and Twitter's implementation. So these ugly half and half URLs never exist, and you're not paying a double request price
Re: Broken Links
#70Earlier quoted context omitted.
no, with google's proposal, the #! links are all from the site root, see Lifehacker and Twitter's implementation. So these ugly half and half URLs never exist, and you're not paying a double request price
Google's proposed kludge doesn't limit URLs to the site root - a path segment is documented. Have a read of it: http://code.google.com/web/ajaxcrawling/docs/specification.h...