Using pushState and popstate with d3.js