Skip to content

When a link is hit again (no change in the address) nothing happens when a refresh is expected #1115

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

Closed
emp opened this issue Apr 23, 2015 · 8 comments

Comments

@emp
Copy link

emp commented Apr 23, 2015

Currently, the only way to reload the same "page" is to actually refresh the browser. If you have a link to, say, /home and you click it again, no new content from /home is fetched, same behavior with the hash URLs.

A quick question on the reactiflux general group in slack told me this is expected, but from an user perpective I'd say the expected behavior is that a link when clicked again should refresh, say that I am on reddit/r/all and I've been away for a while, when I return I click on ALL again in the topbar to refresh the content, not just hitting CMD+R, F5 or the browser reload.

Is there a way to work around that without something like a randomized parameter for links?

@rgrwkmn
Copy link

rgrwkmn commented Apr 23, 2015

Why does the user want the page to refresh? Maybe there should be a refresh button somewhere to update the content on the page.

@emp
Copy link
Author

emp commented Apr 23, 2015

I believe the reddit example explains it well, you have 100+ links in the same place, you end up re-using those links to refresh content since it is how you got there in the first place.

@agundermann
Copy link
Contributor

I'd prefer that behavior as well (#826); it's also how browsers behave on static pages.
I can't think of a clean workaround. You could give the PR (#1031) a try though.

@emp
Copy link
Author

emp commented Apr 23, 2015

Thanks, #826 also shed some light on the history spam in your example, which I didn't consider. The PR looks in the right direction.

@th0r
Copy link

th0r commented Apr 23, 2015

+1
I think "refresh on click" behavior should be configurable.

@hiddentao
Copy link

+1

@frontengineer
Copy link

Help, please. Given the reddit example "yes," the page reloads, but the when you hit "back" button your history goes -1, whereas the ReactRouter each reload is a new history.push()...meaning I might click "href=/About" 5 times...then I will need to hit back button 5 times to get off about.

Is there a discussion or correct approach (beyond < Link to="About" >) for this?

Update

This issue is client-side using Router.HistoryLocation. Removing Router.HistoryLocation navigate closer to expected. Thank you.

@ryanflorence
Copy link
Member

follow #826 and #1031 thanks :)

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants