-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use the history API #31
Comments
I would have used the history API from the beginning, except that it doesn't fire an onhashchange equivalent when you click on a link. popstate doesn't fire when you click on a link, so we would also have to implement some kind of hack to make all links not actually visit the link that they pointed to, and fiddle with the history manually in those cases. Related: TehShrike/abstract-state-router#48 |
Either that or, on page load, use |
What event is fired when you click on a link where you can call |
Well, |
Yeah, watching for all click events and doing magical things when the clicked thing happens to be a link is the only way I know of too. |
I wouldn't call it 'magic', it's simply a different kind of navigation |
Well, handling all click events and adding non-standard behavior to core browser behavior (what happens when you click on |
I'm going to close this for now, but the idea will be implemented eventually when we start working on the static-server support for Noddity. |
https://github.com/erikringsmuth/pushstate-anchor just found this |
What do you think about using the history API after static rendering (#30) is completed?
The history API is 80% supported, and anyone without it could fall back to http requests.
See ponyfoo/stop-breaking-the-web.
The obvious downside being, that hashbang urls that are in use right now would have to be supported, or redirected to the correct page.
The text was updated successfully, but these errors were encountered: