The following example will cause the page to redirect to another page, keeping the browser history. This might seem like a minor point, but if you redirect a user to another page they will be able to click back, which will mean that they are redirected again.
This works in the same way as location.href, but in this case the redirection will occur and no history will be kept in the browser. This means that if a user visits the page with this code on they will instead see a different page. This means that the user can't click on the back button and view the page that redirected them. Here is an example of its usage.
You can also add this to a link by doing the following, although the user wouldn't be able to get back to the page that redirected them.