Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stop reloading dapps on network change #3599
This is expected behavior since users who switch chains should have an updated UI on the current status of that chain. Since many applications rely on being on a specific network to function, this is a way for us to avoid users getting confused with interacting with a dapp that has residual data from another network.
Thank you @Zanibas for your answer.
I truly belive this should be the responsability of the application developper to listen for chain change, and react accordingly.
Let's be honest, forcing a page reload is a disastrous user experience...I really hope there would be a way to avoid this page reload, and let the application developper responsibly react to chainID change...
In my case, I detect the chain change by checking the chainID every 100ms...
What do you think?
@sulliwane The team actually discussed this a bit, and we ultimately agree with you. Force reloading was a band-aid for a period where developers were just learning to make Dapps, and were almost never using good practices. It is probably time to grow up, and remove these training wheels. Changing the title of this issue to reflect the desired action.
changed the title from
Why is browser page refreshing/reloading on chain switch?
Stop reloading dapps on network change
Mar 26, 2018
Yes, more and more apps are recommending custom networks to their users, and as Plasma chains become more common, this will too. MetaMask needs to more seamlessly support this kind of behavior in the future, but in the meanwhile, user interaction is required for those sites.
Having 28 tabs open ! ! ! ! ! ! ! ! ! !
I hate when switching Metamask there is reloading app somewhere else...
EDIT / UPDATE:
It displays a popup preventing the reload:
We'll roll this out sometime in the next month and will share a specific timeline here when it's solidified. Thanks for being patient!
referenced this issue
Aug 29, 2018
hey @Lucas1313 - we haven't rolled this change out to production yet.
Right now, the plan is to include this update as part of our larger breaking change to support EIP 1102, scheduled to launch on Nov. 2. You can read more about 1102 here.
As plans for removing the reload finalize we'll post here and share a detailed rollout plan on Medium as well. Thanks for your patience!