Getting Firefox to cache exe downloads

I am having problems that Firefox will cache the exe file that is on our website. If I download it using IE or Chrome and start the download a second time, the second download will be completed immediately, but with Firefox it will download everything from the very beginning.

I added screenshots from the network tab in Chrome and Firefox. Note that both receive an HTTP status code of 200, but Chrome says (from the cache). What response headers need to be added to make Firefox cache?

Chrome:

Chrome

Firefox:

Firefox

Here is the URL if you want to try downloading it yourself: https://dlud0tbph7s2n.cloudfront.net/Production/Windows/DegooSetup-Production-1.0.1052.exe .

+5
source share
1 answer

You can check if the exe file is cached by looking at "about: cache" or using a tool like HttpWatch .

Your exe file does not receive cache. In older versions of Firefox, which may be due to the file exceeding the maximum size for a single cache entry. By default, the maximum recording size is 50 MB. You can verify this by looking at "browser.cache.disk.max_entry_size" in "about: config".

The problem can be caused by the very large value of the maximum age that you set - 2,000,000,000 seconds is about 63 years. The HTTP specification recommends periods of up to one year, and some browsers refuse to cache with very large max-age values:

fooobar.com/questions/118945 / ...

The recommended maximum value for maximum age is 31536000 seconds or less.

+4
source

Source: https://habr.com/ru/post/1212374/


All Articles