Seneste svar på Firefox tends to evict from cache JavaScript with size over 15MBhttps://support.mozilla.org/da/questions/12693972020-01-15T16:47:44-08:00In the end it seemed that issue has been present only in Firefox 60 ESR branch. Newest Firefox relea2020-01-15T16:47:44-08:00peter.kolinekhttps://support.mozilla.org/da/questions/1269397#answer-1281553<p>In the end it seemed that issue has been present only in Firefox 60 ESR branch. Newest Firefox releases do not have this issue.
</p>I checked the Network Monitor regularly, but never seen RCWN feature kick in. Is it marked by 'raced2019-09-25T01:18:05-07:00peter.kolinekhttps://support.mozilla.org/da/questions/1269397#answer-1254813<p>I checked the Network Monitor regularly, but never seen RCWN feature kick in. Is it marked by 'raced' string in Transfer column? In Transfer I always saw either file size or 'cached' string.
</p>Did you check in the Network Monitor whether the RCWN feature might be causing Firefox not to use th2019-09-24T04:05:49-07:00cor-elhttps://support.mozilla.org/da/questions/1269397#answer-1254672<p>Did you check in the Network Monitor whether the RCWN feature might be causing Firefox not to use the disk cache like I posted above?
</p>cor-el said
...
The Network Monitor shows a 'raced' value in the transfer column.
There is a netwo2019-09-23T21:26:42-07:00peter.kolinekhttps://support.mozilla.org/da/questions/1269397#answer-1254583<p><em>cor-el <a href="#answer-1254443" rel="nofollow">said</a></em>
</p>
<blockquote>
...
The Network Monitor shows a 'raced' value in the transfer column.
There is a network.http.rcwn pref (network.http.rcwn.enabled) that controls this feature, so you can test whether your issue is about RCWN or something different.
</blockquote>
<p>Thank you cor-el for info about this feature, but unfortunately it seems not to be the cause. When I've disabled rcwn, caching was still not used for 15MB file.
</p><p><em>jscher2000 <a href="#answer-1254462" rel="nofollow">said</a></em>
</p>
<blockquote>
You may have found this preference --
browser.cache.disk.<strong>max_entry_size</strong>
-- with a default value of <strong>50MB</strong> (51,200 KB). That seems large enough for your application's needs.
You can review the comments in the source code to learn more about the user-configurable parameters and some of Firefox's behaviors. Other behaviors might not be as clearly documented:
<a href="https://dxr.mozilla.org/mozilla-release/source/modules/libpref/init/all.js#31" rel="nofollow">https://dxr.mozilla.org/mozilla-release/source/modules/libpref/init/all.js#31</a>
</blockquote>
<p>Yes, I've checked those. Just to be sure, I've tried to increase the caching limit preferences to 10 times its default size, also disabled disk smart cache size and extended its limit to a few gigs, but it still did not help.
</p><p>What I noticed also is that, when I completely clear Firefox cache, the 15MB file is cached and is being used from cache for a while. It is also shown in about:cache disk stats that the file is there and usage count increases on page reloads. But after a short time period ( few page reloads ) the file is being transferred from network again, despite I can still see it in about:cache listing - just usage count is not increasing of course. When hitting CTRL+F5 on the page, I can see new refreshed entry in about:config with usage count one or a few times, but then again after a while file is being requested from network.
</p>You may have found this preference --
browser.cache.disk.max_entry_size
-- with a default value of 52019-09-23T08:31:27-07:00jscher2000https://support.mozilla.org/da/questions/1269397#answer-1254462<p>You may have found this preference --
</p><p>browser.cache.disk.<strong>max_entry_size</strong>
</p><p>-- with a default value of <strong>50MB</strong> (51,200 KB). That seems large enough for your application's needs.
</p><p>You can review the comments in the source code to learn more about the user-configurable parameters and some of Firefox's behaviors. Other behaviors might not be as clearly documented:
</p><p><a href="https://dxr.mozilla.org/mozilla-release/source/modules/libpref/init/all.js#31" rel="nofollow">https://dxr.mozilla.org/mozilla-release/source/modules/libpref/init/all.js#31</a>
</p>Firefox can send both a request to load content from the cache and also send a request to the server2019-09-23T07:04:13-07:00cor-elhttps://support.mozilla.org/da/questions/1269397#answer-1254443<p>Firefox can send both a request to load content from the cache and also send a request to the server.
Which response arrives first is used.
This is called a 'racing' feature (RCWN: Race Cache With Network).
If you have a slower hard drive then in some cases the server might respond quicker and send a partial file.
The about:networking#rcwn page shows the current RCWN stats.
</p><p>The Network Monitor shows a 'raced' value in the transfer column.
There is a network.http.rcwn pref (network.http.rcwn.enabled) that controls this feature, so you can test whether your issue is about RCWN or something different.
</p>