History not working when returning to page from non-docs page