Should I use pushState to update my URLs instead of using the hashbang (#!) style to manage Ajax navigation?
Paul Irish, Mountain View, CA
Have a question? Ask it in our Webmaster Help Forum: http://groups.google.com/a/googleproductforums.com/forum/#!forum/webmasters
Want your question to be answered on a video like this? Follow us on Twitter and look for an announcement when we take new questions: http://twitter.com/googlewmc
More videos: http://www.youtube.com/GoogleWebmasterHelp
Webmaster Central Blog: http://googlewebmastercentral.blogspot.com/
Webmaster Central: http://www.google.com/webmasters/
source

hmm. you have get the answer as i think. it will be better to push up because we have run according to new generation. its better than managing.
of course pushState is the modern, new way of updating the URL without a page refresh. Although, big players like Grooveshark and even Gmail, still use the hashbang approach. Why? Simple. Backwards compatibility. IE only starts supporting pushState at version 10
It's great how pushState doesn't need anything extra added to it for Google to crawl. Sometime these small things do add up to something that's significantly useful.
I've got a website live that uses push state, and it looks like google is only crawling the front page. I'll confirm using webmaster tools
Hi Matt, How can I make my website redirect to multiple Ip specific to country for PHP based website, as Google.com redirects to Google.co.in for India. Which is the best way for Google bot to catch up and make it understand?
sniffing for googlebot is always bad news
the "_escaped_fragment_" for pushState should just be the URL.
pushState is just a way to change the address bar. The new address should actually exist on the server.
/ -> pushState -> /mypage
if /mypage doesn't actually exist then people going to it directly get a 404.
I don't think google does anything special for pushState. It just follows the hyperlink like normal.
you need to recreate the whole state server side for #! too
#! means you can replace it with ?_escaped_fragment_= (or &_escaped_fragment_=) and have the server return the content, or something like that.
Also, these questions should submitted to one of those links in the video description if you want Matt to see them. I don't know if he reads these comments for questions.
I don't know anything about if google can run javascript.
Haha, think so too 😉
Check out Rob Ousbey's (of Distilled) example site if you want to know more about pushState (and popState for back button). Should be the first result searching for [pushState html5 example]. No affiliation, just a fan.
Thanks , useful thing!
This is relay a nice post.
This time Matt is somewhat straight to respond the question. 🙂
We can. There are Internet porn sites dedicated to it.
Haha yes why can't we love ourselves?
great
nice, I was just reading about 37 signals use of pushState and localStorage on the new BaseCamp 🙂
you people are ruining people lives and you don't give two shits! Google sucks!
Matt –
Where can we get that shirt?
Great to know that pushState is encouraged over hash bangs for AJAX.