3 ms·
Unless you are using IE <10 this is a trivial problem to solve using history.pushState() http://caniuse.com/#feat=history http://caniuse.com/#feat=history
by NathanKP 12y ago
Unless you are using IE <10 this is a trivial problem to solve using history.pushState()
http://caniuse.com/#feat=history http://caniuse.com/#feat=history
- joshstrange 12y agoThere are quite a large number of people who still have to support < IE10 (myself included). Hopefully in the next year or two we will drop support for IE9 and then we can use it but we aren't there yet. Also the whole SEO issues are not something the sneeze at. I've yet to see a comprehensive approach to this that doesn't involve phantomjs running to serve up HTML to search engine bots. Maybe the bots will just get smarter and we won't have to worry about it but the jury is still out on that. Luckity once I get to stop supporting IE9 I can go to single page (with push state) because the app I work on does not get seen by search bots and SEO is not a concern.
- NathanKP 12y agoYeah I agree the SEO issues. Anything that is dependent on search traffic should not be a single page app, as it will hurt your ranking greatly. Google actually runs JS these days, but you'll still get penalized for slow speed if you load all the content in via JS instead of just serving a flat HTML page to the bot. And that's not even considering Bing and other web bots that almost certainly do not have JS running capability. They will just see an empty page. If you are making a dashboard or web app which is not intended to be crawled by Google, and not really dependent on search traffic though then single page is a great way to go.
- joshstrange 12y agoI agree 100% and as soon as my company stops supporting IE9 I will be pushing for using pushState and more single-page app-ness.