5 ms·
The problem is that the meaningful part of the URL is only sent to the server via JavaScript. Your browser doesn't normally send the fragment (the part after th
by daxelrod 16y ago
The problem is that the meaningful part of the URL is only sent to the server via JavaScript. Your browser doesn't normally send the fragment (the part after the #) when you access a page.
That means there's no fallback for when the JavaScript breaks (which just happened) or for crawlers (except Google), browsers without JavaScript, etc. The site has absolutely no content without working JavaScript.
The author asserts that this also breaks caching. (AFAICT, more analysis would be needed to support this, because the extra request the JavaScript makes may very well be correctly cacheable.)
- waqf 16y agoThanks. What got me was that for some reason I couldn't figure out whether I was being told why the author thought #! was a bad idea, or why Lifehacker had thought it was a good idea.
- deleted 16y ago[deleted]
- wahnfrieden 16y agoThis article is really out of date, and only describes a problem with older browsers. This problem will be mostly eradicated with the new pushState and replaceState functions in HTML5, which allow you to rewrite the URL without needing hashes. So while the URL will be changed by JS as you navigate a web app, if someone saves the link and puts it on their own page and Google spiders the link, it will work fine (so long as you send the entire page when the request is not via XHR) because the entire URL is sent in the request, unlike with hashes. The problem is with Google visiting your site and trying to spider it. There are other solutions for this though.