-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does pushy not work with # fragment urls? #14
Comments
I miss the part behind the hash too. What's the reason it's not taken into account? |
Hash URLs are used as a way of faking a page change. Now days with modern browsers supporting HTML5 push state this hack is no longer required. Pushy wraps up this newer API into a familiar ClojureScript library. There is currently no plan to support this older approach of history accounting in Pushy. |
How do you suggest single-page apps handle navigation? If the whole thing is served from a single I think that fixing this would require making the webserver return the same payload for any request, which limits the deployability — I can't just plop the file on S3 (or another dumb HTTP object store) and have it work. If you need special support on the backend, this defeats the purpose of writing a SPA, at least for me. |
@ieure We will think about supporting this. For the apps we have written, we have not needed this kind of hash bang routing. The point you make about dumb servers is one we never considered. We will look into implementing this. Naturally, a PR would be very welcome 😄 |
Thanks, I'll see if I can put something together. |
Url fragments are used for more things than hacks, for example table of contents links:
|
I fixed it by using the Modnakasta fork to process url fragments, providing a custom
|
Ok, that might explain why links (with anchors) to specific parts of my user's guide were not working. As @dustingetz wrote, hash fragments are useful in a number of scenarios, not just for faking page changes. In my case, I have a number of server-side rendered pages which are then used ("hydrated") with React-based client-side JavaScript. |
fragments after the # don't seem to be supported. Is there a reason for that?
i.e if an href contains "/#some/path" the match function will only be passed "/".
The text was updated successfully, but these errors were encountered: