Helper for updating the browser title and also the History entry.