4 ms·
"AJAX Crawling" is great, but the hash trick has been used with AJAX long before this to provide back button support in AJAX-heavy websites. Before this techni
by qeorge 16y ago
"AJAX Crawling" is great, but the hash trick has been used with AJAX long before this to provide back button support in AJAX-heavy websites.
Before this technique was widespread, it was all too common to hit "Back" and be taken to the previous website you'd viewed, even if you'd viewed more than one page on the original site.
By changing the URL's fragment the website can add entries to the browser's history. That way when the user clicks Back the website can react appropriately, changing its state back one iteration. This preserves the expected behavior for the end user, while allowing the website to leverage the benefits of AJAX.
The shebang (#!) is merely a way to distinguish AJAX links from bookmarks, for the purpose of crawling.
- masklinn 16y ago> "AJAX Crawling" is great, but the hash trick has been used with AJAX long before this to provide back button support in AJAX-heavy websites. > Before this technique was widespread, it was all too common to hit "Back" and be taken to the previous website you'd viewed, even if you'd viewed more than one page on the original site. Uh yes, the original poster of the question is aware of that: > As far as I can recall, earlier this year it was just a normal URL-fragment-like string (starting with #), without the exclamation mark. His question was not about the hash, but specifically about the shebang.