DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.21k stars 1.51k forks source link

iOS Image header caching #571

Open iJimmyWei opened 5 years ago

iJimmyWei commented 5 years ago

Describe the bug On iOS, images that have already been loaded with headers are being cached.

Attempting to load the same image but appending a ?u=123 query parameter to it, to fetch a more recent version of that image from the same endpoint causes the previous headers to be passed into the new request.

This may not be desirable as an endpoint that handles requests based on different headers passed in would have an unexpected outcome, with extra redundant headers being passed in.

For reference, android does not exhibit this behaviour.

To Reproduce Steps to reproduce the behavior if possible, or a link to a reproduction repo:

  1. Pass in headers into a FastImage component
  2. Observe on API level the headers being received
  3. Pass in different headers into another FastImage component
  4. Observe on API level the previous headers being passed in from step 1, as well as the headers in step 3.

Expected behavior Headers should be reflective of the current FastImage request, not cached ones.

Dependency versions

danielhover commented 4 years ago

@iJimmyWei i'm running into the same issue. Have you found a workaround?