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

feat: webViewWebContentProcessDidTerminate: start at root path or document the current behavior #6680

Open
hermitdemschoenenleben opened this issue Jun 27, 2023 · 0 comments

Comments

@hermitdemschoenenleben
Copy link
Contributor

Feature Request

Description

For quite some time, we noticed weird errors in our error logs that we couldn't explain. After some debugging we found out that sometimes our ios app doesn't start at / path but at some subpath. This was quite surprising for us as we expected that mobile apps always start at / path. After a while we found out that webViewWebContentProcessDidTerminate followed by webView.reload() is the culprit here.

We've spent quite some time on debugging this issue and as there are some threads on stackoverflow discussing this topic, others probably have been doing so as well.

I'd like to propose two solutions for this:

  • webViewWebContentProcessDidTerminate could do webView.load("/"). This would result in a completely normal, clean app start, which is the least confusing behavior in my opinion.
  • I do understand the approach of "restoring as much state as possible", though. If you think it's better to reload the webview at the current path, I think it would help a lot if this behavior was documented somewhere: a warning that developers shouldn't expect the app to always start at / would help a lot.

Platform(s)

ios

Preferred Solution

After webViewWebContentProcessDidTerminate load the webview at / instead of reloading it at the current path.

Alternatives

Alternatively, document the current behavior.

Additional Context

#2379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants