]>
| description | Demo website for the minimum JavaScript required to implement client-side routing. |
| last change | Tue, 23 Jun 2026 06:04:11 +0000 (23:04 -0700) |
| URL | https://git.ardis.lu/minimal-routing.git |
| ssh://git@git.ardis.lu/~/minimal-routing.git | |
| git@git.ardis.lu:minimal-routing.git |
Demo website for the minimum JavaScript required to implement client-side routing using the Navigation API (new as of January 2026).
Code repository mirrors: GitHub, Codeberg, git.ardis.lu
This demo website assumes that the web server has been configured to serve index.html on all routes EXCEPT for the special path: /errors/NotFound. For /errors/NotFound, the web server must respond with a 404 Not Found error and the file /errors/404.html.
Note: this file path is intentionally nested in a folder because some static site hosts (like Cloudflare Pages) use a top-level 404.html page as a flag to override the desired behavior of serving index.html on all other routes.
The desired behavior can be replicated locally using the npm package local-web-server:
ws --spa index.html --rewrite '/errors/(.*) -> /errors/404.html'
| 3 months ago | main | shortlog | log | tree |