use history.state instead of the popstate event for the initial load