Ensure the page is loaded before updating the url fragment