It is also partially the web's fault. There isn't an easy way to detect an "in-page" navigation. The best solution I am aware of is:
1. Add global "click" listener. 2. Check that the click target was an `a` tag. 3. Check that the click was a single left click with no modifiers. 4. Check that the `href` points to a page that you can render. 5. Call event.preventDefault() and handle the navigation yourself.
But step 3 isn't even sufficient as people can configure their browsers to open all links in new windows or tabs.