write location.hash too