Problem
#36560 (comment)
I believe I've identified the issue—the preflight response isn't being cached, resulting in its repeated execution with each image render. While the images themselves are cached, the browser is forced to reinitiate the preflight check due to the absence of caching headers. These headers are crucial as they instruct the browser on whether and how long to cache the preflight request.
- a preflight request is being made even though the actual resource is cached

Consequently, in offline scenarios, the browser is unable to perform the preflight request, leading to a failure in loading all images.
Here are some visuals to illustrate the point:
Solution
To fix the issue in offline usage, and omit doing preflight request for cached items we should add some cache to the preflight response as well (this is a backend task)
cc @trjExpensify since you're helping coordinate this effort as BugZero
cc @kidroca since the above P / S was written by you 🙏
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01d9de82c0447606ee
- Upwork Job ID: 1762857975561478144
- Last Price Increase: 2024-02-28
Problem
#36560 (comment)
I believe I've identified the issue—the preflight response isn't being cached, resulting in its repeated execution with each image render. While the images themselves are cached, the browser is forced to reinitiate the preflight check due to the absence of caching headers. These headers are crucial as they instruct the browser on whether and how long to cache the preflight request.
Consequently, in offline scenarios, the browser is unable to perform the preflight request, leading to a failure in loading all images.
Here are some visuals to illustrate the point:
Image caching example (Notice how the GET response for the image is cached):

Preflight request missing caching headers:

Solution
To fix the issue in offline usage, and omit doing preflight request for cached items we should add some cache to the preflight response as well (this is a backend task)
cc @trjExpensify since you're helping coordinate this effort as BugZero
cc @kidroca since the above P / S was written by you 🙏
Upwork Automation - Do Not Edit