Use hash router
Just use the o-router component to link the routing inside the app component to the current webpage. Once the page is bound to the router, the routing state of the page can be maintained even when the page is refreshed.
In this example, please click the button to open and try in a new page.
<l-m src="https://cdn.jsdelivr.net/gh/kirakiray/ofa.js@4.5.26/libs/router/dist/router.min.mjs"></l-m>
<o-router fix-body>
<o-app src="./app-config.mjs"></o-app>
</o-router>