react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

Setting cache:false does not take effect in ios

Open chenx0000 opened this issue 2 years ago • 3 comments

What react-native version are you using? 0.61.5 What react-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. Interesting logs 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?

chenx0000 avatar Sep 08 '22 08:09 chenx0000

Same issue here

uygurugurlu-jf avatar Sep 29 '22 16:09 uygurugurlu-jf

One workaround is to set the Cache-Control header to no-cache like this:

<Pdf
  source={{ 
    headers: { 'Cache-Control': 'no-cache' },
    cache: false,
    uri 
  }}
  ...
/>

gfgabrielfranca avatar Apr 26 '24 17:04 gfgabrielfranca