This thread was archived. Please ask a new question if you need help.
How to make Firefox load tab session from cache
How can I make Firefox restore all my tabs from the cache instead of fetching all pages? All I want to achieve is that Firefox simply is in the exact same state as it was when it was last closed. This was no problem with Opera, but I couldn't achieve this with Firefox yet. I have disabled the "Don't load tabs until selected" option because the delay when switching to a tab annoyed me. But now Firefox always reloads all pages on startup which also is not what I find the sensible thing to do. Is there a "about:config" setting I could tweak to have Firefox load everything from its cache so I can continue working without having to reload all pages?
All Replies (20)
Tried Firefox Sync? It's awesome! Switch computers & it saves open tabs, pwords, history .
Let us know if this work .
Thanks for your suggestion, but I don't want to sync even if it should actually make Firefox load my tabs from the cache.
The cache files are on my local drive and all I want is that Firefox loads them properly without fetching them again from the network.
Firefox should load the pages from the cache unless the disk cache is disabled or possibly web pages specify not to cache their pages.
Firefox will probably contact the server to check the cache status.
What does the about:cache page tell about the disk cache?
Note that Firefox disable the disk cache if you use "Clear history when Firefox closes" to clear the disk cache.
Thanks, I have set the option to have my tabs restored on Firefox start. My gripe is that each page is reloaded from the web instead of read from the cache. I just want to have Firefox be exactly the same as it was when I closed it. With many open tabs this is so annoying and Opera did this just fine...
@cor-el: Thanks. Firefox definitely tries to fetch something from the web for each and every page because when I block the network all pages show up with an error.
The about:cache shows me: Memory cache device Number of entries: 1451 Maximum storage size: 32768 KiB Storage in use: 22993 KiB Inactive storage: 22993 KiB
Offline cache device Number of entries: 0 Maximum storage size: 512000 KiB Storage in use: 0 KiB Cache Directory: C:\Users\xxx\AppData\Local\Mozilla\Firefox\Profiles\xxxxxxxx.default\OfflineCache
I do not have the clear history when closing Firefox option enabled.
Is there an option to tell Firefox not to check with the servers if the page content has to be refreshed?
In my opinion closing and restarting Firefox should not generate any web traffic at all. Just let me continue working where I last left off.
So the disk cache section that should appear between the memory cache and the offline cache is missing on the about:cache page?
What does it say in Options > Advanced > Network > Cached Web Content?
You can check browser.cache.disk.* prefs like browser.cache.disk.enable on the about:config page to see if the disk cache is enabled.
@cor-el: You are right, in "about:cache" there is no offline cache section listed.
I had the "Cached Web Content" option overriden and had the cache size set to 1024MB.
Now I have disabled the "Override automatic cache management" checkbox and restarted Firefox. But "about:cache" still is not shown.
I checked browser.cache.disk.enable and it was set to false. After changing it to true, the disk cache now is listed in "about:cache".
Thank you very much, this has improved the situation.
Now some tabs are restored from cache, unfortunately most of them are still fetched from the web. I confirmed this by exiting Firefox, blocking all network traffic and restarting Firefox.
Is there any setting that disables reloading of web pages when starting Firefox?
I guess it's due to the web pages which specify to reload the web page. But in my opinion exiting and restarting Firefox should not alter the state, it should behave like it was running the whole time.
Curiously, another user experienced the opposite problem: pages he expected to update did not update when restoring the earlier session: browser.cache.check_doc_frequency=1 doesn't work. Something is at work here that isn't obvious...
That's really funny, because I'd ask who in the world would want to start Firefox and have it load 20+ tabs at startup? I feel closing and opening Firefox should act as if Firefox was just left alone for a certain time span, just like minimizing it. Just give me the exact same state as I left off. Otherwise you'd consequently also have to enable some kind of auto-refresh in case web pages are updated while Firefox is running.
On the other hand, restarting completely from cache without loading anything seems even more reasonable in case you are somewhere with no network access and want to continue working with your open tabs.
This issue has been raised by several users over the last couple of years but so far no valid solution was given.
This is not just about reloading a large number of tabs either: as Romarin12 reports (https://support.mozilla.org/fr/questions/945377), it is also the added nuisance of having to log on again to potentially several sites.
As sponkii points out (https://support.mozilla.org/en-US/questions/936102), older versions of Firefox DID load tabs from the disk cache after restoring a session. I would have thought that when the tab loading strategy was changed, some setting must have been added to restore the previous behaviour on option, for those concerned with the start-up performance and/or having to log back on issues?
Modified by hol314
Hi hol314, the question of whether you stay logged in to a site when you restore an earlier session is different than whether Firefox uses a cached version of the page.
If you haven't modified any settings:
- Many sites will set a persistent cookie to keep you logged in across Firefox sessions, but at a minimum, the site usually sets a session cookie to recognize you from one request to the next
- Session cookies normally are wiped after you exit and restart Firefox, but are saved in your session history file (current windows and tabs, and recently closed windows and tabs) as you browse so that if Firefox crashes, you can resume where you left off
- Your session cookies are purged* from your session history file if Firefox shuts down normally and you do not have Firefox set to automatically start up with your previous session windows and tabs (but any persistent cookies are preserved)
If you set Firefox to delete cookies at shutdown, then you will always need to log in to the site again even when you restore your previous session.
* Correction on the third bullet: by default, only the secure site (HTTPS) session cookies are purged. But those probably are the ones of most interest.
Modified by jscher2000 - Support Volunteer
Thank you for your detailed reply, I realise I have not been clear enough. My point is that when a tab is retrieved from the cache, it is displayed even if the session cookie is gone or expired!
Indeed I do get to see the content of my tabs when Firefox starts... up to the point where they are reloaded.
And earlier versions of Firefox did not have this problem, one needed to explicitly reload tabs (which I am aware would not be secure on a public computer).
I literally cannot use Firefox within a minute or few after I start it because it does not react on anything doing loading of all my tabs from Internet again and again! It is especially annoying if some sites lag or are unavailable - I have 404 page instead of my precious tab which I kept for its content. That is a BUG of Firefox, I refused to update my old 2.x version while I still could keep it because it was free of that ugly behavior. In fact, you pushed me to use Google Chromium more and more because of this bug of Firefox and I hate Chromium but you left me no choice unfortunately - the Firefox is simply unusable now unless I have some time to start it and go to take a dinner while it loads. And it's disaster if some site crashes Firefox, I cannot have so much dinners in a single day. Other browsers are free from this problem you know. I hoped you finally fix it but it's still there for years and I lost my hope already. I'm sorry to tell you that.
Modified by LStranger
Hi LStranger, this is why the default setting was changed to only load the active tab in each window when you restore the previous session, not every tab in every window. (In Options or Preferences, Tabs panel, "Don't load tabs until selected")
The whole session restore feature is fragile, and I certainly would not recommend that anyone rely on it to keep track of work. It's just not that reliable.
You can set the browser.sessionstore.privacy_level pref to 2 (never) or 1 (non-HTTPS) on the about:config page to disable saving cookies via session restore in the sessionstore.js file. The browser.sessionstore.privacy_level_deferred pref is used when you do not reopen the previous session automatically via "Show my windows and tabs from last time" and uses the same values.
Neither of your suggestions is what I need. 1) If I defer tab loading it will still ignore any cache and load whole page from internet when I select it so there is a reasonable question - what is the disk cache for at all if it's never used? Just to spam disk I/O and take the place on my file system? Is it a solution to force me upgrade my computer more often, do hardware vendors pay you for that? 2) If I don't save cookies between Firefox restart it does not solve anything but possibly just make problems in some cases.
Well, what I need is exactly the Firefox 2.x behavior - just use cache for page in tab unless it is expired or I explicitly ask to refresh it, it is what disk cache is for, isn't it? Don't attempt to be smarter than users thus force users to do what you think is better for them, please. I hope to see it fixed. Thank you very much.
Hi LStranger, in my case, as long as my previous session ended normally by exiting it, restored tabs load from cache unless the server instructed that they not be cached, in which case, Firefox has to go to the server. If you restore previous windows and tabs after a crash, Firefox does not use the cached version of the pages.
But I think I'm repeating myself. You already know what's going on, and you want it to change.
To make feature suggestions: https://input.mozilla.org/feedback
To file requests for enhancements in the bug tracking system: https://bugzilla.mozilla.org/
I have the same problem as Lstranger. I actually have two browsers – Firefox 28.0 and Palemoon 24.6.2, which is essentially Firefox underneath, and they both behave the same way - steadfastly refusing to store any offline cache. I want to reload all my tabs from disk on startup, at least the html content. Palemoon has the Tab Groups addon as it doesn’t save tabs by default. Both browsers have NoScript, with ABE disabled, as this clears the cache I believe. I have tried disabling the relevant addons, inc NoScript and my settings are set to not delete the cache, but delete cookies. I any case saving cookies makes no difference. I have even tried setting the browser.cache.check_doc_frequency to 2, but this does not help. Deleting the offline cache folders does not help either. They remain empty. Any suggestions would be appreciated.
Hi barry31, "Offline Cache" is different from the normal cache that stores web pages. It is a feature that websites can use to persist data on your computer in case you need to work with it when you're not connected. The fact that you see nothing in your offline cache doesn't surprise me as this is not a widely used feature.
Could you describe how you are testing? For example, do you exit Firefox normally, then terminate your network connection (e.g., pull Ethernet cable, or disconnect/disable wi-fi, or both), then start Firefox again and either automatically resume your earlier session or use menu>History>Restore Previous Session? What happens at that point?