I recently stumbled upon an old article at Moz (formerly SeoMoz) on a tip for creating permalinks while interacting with a web app using javascript. Modern javascript frameworks such as AngularJS often handle these automatically, but it’s nice to take a closer look at how this is done through vanilla javascript.

Create Crawlable, Link-Friendly AJAX Websites Using pushState()

Building websites using AJAX to load content can make them fast, responsive and very user friendly. However, it’s not always been possible to do this without introducing # or #! symbols into URLs – and breaking the way URLs are ‘supposed’ to work. The method outlined here will let you build fast AJAX-based websites that also work well for SEO.