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.

WebView still reads resources from the cache with `cacheEnabled={false}`

See original GitHub issue

Bug description: If you have a WebView component with cacheEnabled={false}, the WebView will still get resources from the memory cache.

To Reproduce: Create a component with <WebView cacheEnabled={false} uri={{ ... }} />. The URI should be to a website with resources that may be cached such as CSS files.

Expected behavior: Web resources should neither be cached nor read from the cache. If you update a CSS file and revisit the corresponding page in a WebView, it should download the new resources.

Screenshots/Videos: Screen Shot 2019-09-18 at 5 24 28 PM Safari Developer tools show the page reading resources from the Memory Cache. This happens even if you go to Develop > Empty Caches in Safari.

Environment:

  • OS: Mac OS
  • OS version: 10.14.6
  • react-native version: 0.60.0
  • react-native-webview version: 5.12.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:14

github_iconTop GitHub Comments

14reactions
huent-1493commented, Apr 2, 2021

I try cacheEnabled={false} and cacheMode={‘LOAD_NO_CACHE’}. It is work in android, but ios not working. Then I try incognito={true}. It is work both android and ios.

10reactions
github-actions[bot]commented, Nov 27, 2019

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is android webview not loading all resources from cache?
I am implementing Android webview which loads lists of feeds. When the internet is off, webview loads from cached data, sometimes it loads ......
Read more >
Clean Android WebView caching - Medium
Want to learn how to reliably cache android webviews without causing context leaks? ... They can interact with team's resources using that.
Read more >
WKWebView - What configuration is - Apple Developer
I am configuring URLRequest object with a cachePolicy of .useProtocolCachePolicy and using the load(request:) method on the webview instance. The remote ...
Read more >
WebSettings - Android Developers
Gets whether the WebView does not load image resources from the network. ... Gets the current setting for overriding the cache mode.
Read more >
How to access to cache in WebView from WinForm
Hi, I am currently trying to integrate Auth0 into WinForm app with Auth0.OidcClient library and following the example provided Auth0.
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