How to cope with refreshing page with JS History API pushState
问题 A small website I was creating (more like fiddling) uses AJAX to load each page. Previously I was changing the hash of the url, this worked great but was ugly, and the user could refresh the page, and it would stay on the same page. Now I have switched to using pushState in the JS History API, which looks much better, and the back and forward work, but refreshing does not. For example: Going to: http://example.com/page2 goes to a 404 as there is no real page called page 2. But if I click on