window.addEventListener("popstate", function(e) { getContent(location.pathname, false); });
<button id="goback">Back</button>