reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Aaron Decker 2021-05-03T11:30:30.219600Z

Is there a current best practice for what to do with browser history if a user deep-links to a page? This is in the context of Reitit's frontend browser history integration. For example, suppose I had a todo app, where the first page in the normal workflow is a list of todo items, and the user would normally click on one of those to route to a second page to edit the todo item. What if the user skips the first page by deep-linking to a specific note? Is it better to: a) Recognize that deep-linking occured and then reconstruct the browser history based on what it would have been had they gone through the normal workflow? or b) Ignore the browser history and just push-state for all navigation events?

eskos 2021-05-03T14:20:25.219800Z

In general browser history rewriting for any reason is usually extremely unexpected behaviour from user’s perspective. So I’d say just push the whatever deep-linked page is shown to history and that’s it.

eskos 2021-05-03T14:21:04.220Z

History rewriting is mostly done by malware and hijacker sites, and as such it can work as quite a deterrent as well; it is not what people expect legitimate sites to do.