question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preload WebView while in background/offscreen

See original GitHub issue

Hello,

first of all thanks for your time maintaining this awesome project.

Is your feature request related to a problem? If so, Please describe.

I am trying to preload a WebView while in background. I use react-navigation with a BottomTabNavigator and its lazy-mode deactivated; this renders all tabbed children at the same time. As the WebView is a direct child of one of the tabs I confirmed it calling the render function of the WebView tab directly at app start while the navigator is loaded. However onLoadStart is only called if I navigate to the WebView tab - effectively becoming onscreen and visible. This is too late in my case.

Describe the solutions you came up with

  • I tried a forced reload without success.
  • Found various ways to do it in native, which are not applicable for react-native. (i.e. see here)

Additional context

Tried it on iOS only at the moment.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:15

github_iconTop GitHub Comments

19reactions
ngodangkhoacommented, Jun 26, 2021

Have any updating for this feature?

11reactions
golearycommented, Jan 30, 2021

Wow that’s a gnarly workaround @MrXyfir

Could someone please reopen this? @safaiyeh? It seems like there is still plenty of desire for this functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preload WebView while in background/offscreen #971 - GitHub
I use react-navigation with a BottomTabNavigator and its lazy -mode deactivated; this renders all tabbed children at the same time. As the ...
Read more >
Load WKWebView in background/off screen - Stack Overflow
I'm thinking of an automatic background procedure to create screenshots of those files, as long as they would not change permanently, so the ......
Read more >
[chromium-dev] Preloading webview (when webview in not ...
This allows them to pre-load and pre-render the content of the messages before you view them. Pre-render doesn't really happen when the webviews...
Read more >
WKWebView - Preload/Load in background? : r/swift - Reddit
My hope is to put a sort of loading/welcome view in and load these URLs while this view is active before sending the...
Read more >
Preloading A Webview And Then Switching To Its Activity - ADocLib
The WebView class is an extension of Android's View class that allows you to display web pages as a ... Preload WebView while...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found