Update document ensure loaded to wait for url