Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
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
up vote 6 down vote accepted

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.

share|improve this answer
Under bugzilla this post 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

You must log in to answer this question.

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