Why is this not done whenever the URL changes?