Use window.location.replace instead of assigning to window.location.

Now you only have to hit the back button once after you open a page of
docs.djangoproject.com :)