Open chenx0000 opened 2 years ago
Same issue here
One workaround is to set the Cache-Control
header to no-cache
like this:
<Pdf
source={{
headers: { 'Cache-Control': 'no-cache' },
cache: false,
uri
}}
...
/>
const updatedUrl = ${url}?t=${new Date().getTime()}
;
Append a timestamp to the URL to force reload and bypass cache
What
react-native
version are you using? 0.61.5 Whatreact-native-pdf
version are you using? 6.0.0 What platform does your issue occur on? (android/ios/both) ios Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interestinglogs
Setting cache:false does not take effect in ios,but it works in Android.We use absolute path as uri.When the pdf content changes,use the same path to open the content unchanged. Join a screenshot or video of the problem on the simulator or device?Show us the code you are using?