Update method of retrieving URL of current page