Skip to content
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

Firefox rendering wrong URL #837

Closed
agundermann opened this issue Feb 14, 2015 · 10 comments
Closed

Firefox rendering wrong URL #837

agundermann opened this issue Feb 14, 2015 · 10 comments

Comments

@agundermann
Copy link
Contributor

Steps to reproduce:

  1. On Firefox, go to http://react-router-mega-demo.herokuapp.com/
  2. Click any contact name
  3. Focus URL bar, press enter
  4. Click back button

Expected: URL path and content match up (either root or contact)
Actual: URL path is '/', but contact is rendered

Not sure about other browsers.

Apparently, this is due to browser back forward caching which can be disabled with

window.unload = function() { }

Is this worth documenting or even fixing?

@julen
Copy link
Contributor

julen commented Feb 24, 2015

I'm on Firefox and cannot reproduce this issue.

@BerkeleyTrue
Copy link

Working fine for me on FF 35.0.1

@agundermann
Copy link
Contributor Author

That's weird. I tried it on several machines (all windows though) and all of them were affected.

Here's a gif: http://i.giphy.com/AxVvjHQiDubQvpgcJW.gif

Are you sure that doesn't happen on your machines?

@BerkeleyTrue
Copy link

Its an illusive bugger, but check out this out.

Just upgraded to FF 36 on OSX Yosemite.
rr-ffbug

but FF dev ed 37.0a2
rr-ffbug-2

@julen
Copy link
Contributor

julen commented Feb 24, 2015

37.0a2 here on OS X as well, but all working fine.

@ryanflorence
Copy link
Member

@taurose I can't reproduce this either, let me know if you track it down, closing until then.

@agundermann
Copy link
Contributor Author

Still an issue (FF 38.0.5, Windows 8). Not sure why you can't reproduce this. Maybe the URL bar thing isn't consistent across platforms. Try this:

  1. On Firefox, go to http://react-router-mega-demo.herokuapp.com/
  2. Click any contact
  3. Click Ryan Florence at the top to leave the app
  4. Go two entries back at once by right clicking the back button

You should see the contact rendered, but the URL of the index page.

As far as I can tell BFCache is the problem. It caches the whole DOM of the app at the state it was left, but then restores it even if we reenter at a different URL. And popstate/hashchange doesn't fire, so the app can't catch up.

As explained in the link above, I think we'd have to listen to some extra event. We can also suppress the cache, but would be nice to take advantage of it.

@ryanflorence
Copy link
Member

ping @taurose, do you know if this is resolved on master?

@ryanflorence
Copy link
Member

closing, I think history fixed this stuff, please reopen if I'm wrong.

@agundermann
Copy link
Contributor Author

Not yet, but there's an open issue remix-run/history#34

@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 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

5 participants