I often rely on Firefox's cache to reopen pages I've previously visited while offline and more quickly load webpages. However, when Firefox is improperly terminated (such as by a hard computer shutdown caused by a power failure), the cache becomes empty. Why? Does it become corrupt, or is there some other technical reason? This question is platform-agnostic.

I'm not asking for speculation or opinion here, but an objective reason for this behavior. If this is by design, I'd like to see relevant references to discussions by Firefox developers or comments in the source code.

  • 1
    I'm not sure how this is not constructive, as I'm not asking for an opinion but a technical explanation of this behavior. Can someone elaborate? – bwDraco Sep 7 '12 at 17:31
  • 1
    I suspect that the Firefox developers (rightly) decided it's better to flush the cache than risk it being corrupted. Since the cache is only there as a performance aid, this is a reasonable decision. – Daniel R Hicks Sep 7 '12 at 17:46
  • Good question, +1 ;) – Henrik Sep 7 '12 at 18:37

If there was an improper shutdown then firefox has no way to know if it was an attack or a hijack attempt, so if the cache is flushed, any viruses dependant on the cache to complete the install after a shutdown are gone.

its a security/safety feature.

  • 2
    Under bugzilla this post bugzilla.mozilla.org/show_bug.cgi?id=105843 has this exact problem marked as wontfix because if mozilla cant detect the shutdown reason, it deletes the cache just in case. "This is by design. The cache is primarily an optimization. Rather than add a bunch of extra code to verify it and fix any potential corruption, we toss it and start again." – David McGowan Sep 7 '12 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.