WKWebView sets CachePolicy unexpectedly to returnCacheDataElseLoad

We are using WKWebView to display a website (developed by us) in our app. When triggering a reload through code (e.g. when foregrounding the app), sometimes WKWebView will set the CachePolicy to returnCacheDataElseLoad. This means that WKWebView will then show outdated content from the user, since it will load the site content from local cache.

We are not manually setting CachePolicy anywhere.

Why does WKWebView decide to use returnCacheDataElseLoad?

The server respons with the following cache-control header: public, max-age=9, s-maxage=2592000

WKWebView sets CachePolicy unexpectedly to returnCacheDataElseLoad
 
 
Q