1

as a browser end user, not a web developer, how can i simply force firefox to always store https cache as it would with http? Ideally for even longer than the website author mentions the cache should be valid, but that would just be a nice extra at this point.

I do not want any automatic for-my-own-good safety in this case. I understand that in 1993 or so the developers had to add some blanket safeguards for https data, but now that every single site is served as https, that is more inconvenient than helpful. Specially when you do not have an always on internet connection!

I'm fine with private-browsing not saving cache, in fact that would even be better. But i do want that a documentation site served over https that i'm seeing today, will still be showing on my browser when i resume my computer from sleep tomorrow, without a internet connection.

I already tried to enable (=true) in about:config: browser.cache.disk.enable, browser.cache.disk_cache_ssl, browser.cache.offline.enable, dom.caches.enabled, dom.caches.testing.enabled, privacy.clearOnShutdown.cache=false.

look at their docs, https://firefox-source-docs.mozilla.org/networking/cache2/doc.html doesn't even have the words "ssl" or "https" or "secure"...

please, do not reply this with answers about how this behaviour is better for my own good. It is not. I already run a different profile of firefox ESR for banking etc that run on it's own process namespace that cannot even store data to disk. But my regular firefox process should make use of disk cache always.

11
  • 2
    While I understand what might be your issue/concern, your conclusion of why your issue is happening is simply wrong, and this will prevent you from preventing/helping/fixing it. Browsers DO CACHE https websites almost in all cases, see this answer and the sources there stackoverflow.com/a/174510/5518385. If you have an issue with all details - like what you do and what you want or don't want to happen - please describe the issue and not the presumed cause. Commented Apr 26, 2023 at 12:29
  • Just to clarify, are you asking about still being able to see a page that was open before suspend, or are you asking about being able to navigate to other pages as well? Commented Apr 26, 2023 at 12:35
  • Have you tried using Offline Mode in Firefox? There are also a few Firefox extensions that can help you achieve what you want Commented Apr 26, 2023 at 14:36
  • 1
    OS "sleep" doesn't close the browser, it remains open in the same way it was. Perhaps the browser has this "functionality" to refresh pages at some point (after sleep or maybe other times as well) so that you have the newest pages (and cache wouldn't/doesn't help for that since when a full refresh is performed the browser would never simply display the full page from cache.) So that's the route you should be looking, to find out how that browser function is called and if it can be disabled. Commented Apr 26, 2023 at 15:28
  • 1
    It might be part of Tab Unloading as described here firefox-source-docs.mozilla.org/browser/tabunloader (see there a config change to disable) Commented May 4, 2023 at 13:02

1 Answer 1

1

The mechanisms for HTTPS in browsers piggy-backs heavily on that of HTTP, including also the use of the cache for both protocols.

The problem you're encountering is most likely that of the cache page expiring while the computer was asleep.

I have not managed to find information about expiration times in recent Mozilla articles such as HTTP caching, although this article discusses deeply HTTP pragma such as Cache-control.

The article I did find was the ancient HTTP Caching in Mozilla dating from 2002, which uses RFC 2616 for the Hypertext Transfer Protocol -- HTTP/1.1.

The most relevant paragraph is :

The freshness lifetime is calculated based on several headers. If a "Cache-control: max-age=N" header is specified, then the freshness lifetime is equal to N. If this header is not present, which is very often the case, then we look for an "Expires" header. If an "Expires" header exists, then its value minus the value of the "Date" header determines the freshness lifetime. Finally, if neither header is present, then we look for a "Last-Modified" header. If this header is present, then the cache's freshness lifetime is equal to the value of the "Date" header minus the value of the "Last-modified" header divided by 10. This is the simplified heuristic algorithm suggested in RFC 2616 section 13.2.4.

The expiration time is computed as follows:

 expirationTime = responseTime + freshnessLifetime - currentAge

where responseTime is the time at which the response was received according to the browser.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .