I know that it's possible to disable RCWN in my copy of Firefox, but I'm trying to find if there is a way for the server-side to tell all Firefoxes in the world not to use RCWN against particular resources?
Our app uses cloud file storage and we get charged for network traffic. We've configured the server to send appropriate caching headers so that browsers will only download the images (potentially very large) one time and then load them from cache so that we don't get charged over and over again when someone reloads a particular page on our website.
This works very well in Chrome, but Firefox has a feature called Race Cache With Network. RCWN allows Firefox to try loading from cache but simultaneously load from the network and then which ever one finishes first is the winner. But that means that every user with FF is going to be constantly re-downloading these large images even though they are cached which means we're having to pay for the network traffic even though they've got a perfectly good cache of the image.
I would assume the cache could load a 22MB png file faster than the network does, but the FF inspector says it is still taking like 8 seconds to load during the race and the network download won. And even if the network download loses to the cache, it was still downloading most or all of the image anyway.
Are there any http response headers we can add to tell FF not to use RCWN with certain resources?
Here is an example of the headers we send back now:
Content-Type: image/png
Expires: Sat, 06 Jul 2030 21:06:51 GMT
Last-Modified: Tue, 07 Jul 2020 05:21:42 GMT
Pragma: cache
Cache-Control: max-age=315360000, private
Content-Disposition: inline; filename="bob-woodward-book-trade-deficits-lodestar.png"