Computing: Computer Basics

Network and Internet: Downloading complete web pages in order to view them offline.

The more technology is advancing, the less things are functioning correctly. Just consider the cars, that we now call vintage and those, you buy today. Or the washing machine of your grand parents and your own. The reason for this seems evident: The less longer things work, the more those, who sell them, become rich. Observing this same tenancy with computer software is lots more difficult to understand. Microsoft Windows taking 30 or 45 or even more seconds to show a folder's content if the files are sorted by something else than the name, is incomprehensible, may be extremely annoying, but is not a reason to buy a new operating system. The modern software becoming so complicated, that there isn't any longer someone who understands the code and is able to fix such bugs? No idea! Difficult to understand, how it is possible that since version 83 up to the actual version 92 (September 2021), Firefox fails to save complete webpages. This article about the Firefox saving problems is all but no professional analysis of the issue. It's a description of the experiences, I made, and what I did in order to find a work-around. I hope, my text is somewhat helpful to those, who encountered similar problems and searched in vain for a real and durable solution.

This is not always the case. Some pages are (always) saved correctly, other (always) fail. What makes the difference between the first and the second, no idea. I guess, that it has to do with the coding of the page. Chromium based browsers, like Google Chrome and Microsoft Edge, do not have this problem. It (rarely) arrives that page saving is interrupted by the browser itself. Maybe, this problem occurs for large pages, in particular if the server is busy and thus the download speed small. In this case, the entry in the Download list is stroked through and marked as Canceled and a blue Retry button appears below the page title. Do not use the Retry button, but repeat the Save As command in the window with the webpage. This second trial nearly always saves the page correctly (whereas the page saved, using the Retry button, will not display correctly when you try to view it offline).

In the Firefox Download list, the files that do not download correctly are marked as Failed and a round arrow appears behind the page title (replacing the folder icon, that is there, if everything works correctly). The way to retry to save the page is the contrary as with Chrome: Redoing a Save Page As results in another failure. Using the Retry arrow to redo the page download seems in most cases solve the problem. Anyway, all this is more like magic, than computer science. I noticed these last days that a major part of the pages marked as Failed in the Firefox Downloads list, seem actually have been correctly saved and are displayed correctly offline!

The two screenshots below show the Download lists of Firefox (left) and Chrome (right). During this session, Firefox failed for all downloads, except "Claire's Feedback Widget v0.0.7b - HELP", that actually is a simple text page (the filenames ending with a timestamp have been downloaded differently; cf. further down). In Chrome, there has been one download, that was canceled, and that succeeded when redoing the Save As.

Firefox Downloads list with several complete webpage savings failures
Chrome Downloads list with one complete webpage saving canceled

As I already mentioned above, the funny thing is that the failed Firefox pages seem to have been correctly saved and, when opening the local file to view them offline, look exactly the same, as do those, correctly saved with Chrome! But, this is not always the case, I guess. And no clue, when and why…. I had another surprise, when having a look in the _files folder, that contains the images, CSS, Javascript and other files needed for the complete display of the .html file with the same name. There seems to be a major difference between the files downloaded by Firefox (screenshot at the left) and those downloaded by Chrome (screenshot at the right).

The contents of the _files folder of a complete download done with Firefox
The contents of the _files folder of a complete download done with Chrome

The Firefox SingleFile extension.

Having no Internet connection of my own, saving webpages is essential for me. When writing programs, I often need to read through a dozen of pages to find the scientific articles, formulas and examples, that I need; it regularly arrives, too, that I have to review how a Perl or Free Pascal function works, what are its arguments, etc. Thus, the page saving failures of Firefox was a serious problem for me. I tried a series of other browsers, but with all of them, I had the impression, that the word privacy has no real meaning for them. Browsing with Chrome is annoying with all these ads (suppressed by Firefox), clearing cookies, site history and download list has to be done manually (Firefox does all clean-up on exit, if you select so). And another problem with Chrome: Wheras saving complete webpages normally works well, viewing them offline is not always possible, because Chrome tries to connect to the Internet to load no idea what (maybe ads?); in Firefox, these pages are generally displayed correctly. I searched the Internet for months in order to find a solution. Finally, I made a post in the Mozilla Support Forum. And I was lucky: Thanks to a very helpful man, I have now a two-in-one solution. In fact, the Firefox SingleFile extension not only saves complete webpages properly, but also makes it possible to view local .html files with all images displayed!

Installing the SingleFile extension.

You can search for browser extensions using Google Search or using the Add-ons and themes > Extensions page in Firefox Settings. At the extension website (with a detailed description what it does), you'll find a button labeled Add to Firefox. When you push it, you are told, what permissions within the browser an on your computer the extension needs and you'll have to push a second Add button. The extension is being installed; it's your decision, if you want or not to enable it in Private Browsing.

Firefox SingleFile extension: Adding the extension to Firefox

On the Firefox Extensions page, you find a list of all extensions, that are actually installed. Behind the extension name you find two buttons: the first one to enable resp. disable the extension, the second one opens a menu, with, between other, the possibility to uninstall the extension and to open its Options page. SingleFile has dozens of options. I didn't take the time to have a closer look at them; default settings seem to be fine.

Using the SingleFile extension.

As lots of other extensions, SingleFile is added as an icon to the Firefox menu bar. To save a webpage using SingleFile (instead of the Firefox Save As functionality), simply click the blue box with a yellow download arrow. The browser window is dimmed during the time the extension is collecting all the files needed to correctly display the complete page. You may follow the execution of the different phases of this process in a white rectangle at the bottom left corner of the browser window. Saving a page with SingleFile normally takes more time than using the browser saving functionality, but it's rare that there is an big difference. Not entirely true. I used SingleFile to create .html files of my emails, as displayed at Google webmail. After a dozen of pages saved, the time it took to save a page constantly increased and at a certain moment took a minute and more. Not really a problem: Close the browser, then return to your webmail page; download speed will be normal again. Also to note, that the vertical scrollbar must be completely at the right side of the window (otherwise it will not be a correctly working scrollbar with the file created by SingleFile and you can only view the beginning of the page). This problem occurs if the window is subdivided into several tabs. This is for example the case with Google webmail. To correctly save the page, be sure to hide the right pane, before doing so. Finally, note that there are (some) webpages that can't be saved using SingleFile. Why? No idea….

Firefox SingleFile extension: Using the extension to save a complete webpage

Main features of the SingleFile extension.

If you often save complete webpages, I would recommend to install SingleFile within your Firefox browser. Saving files with SingleFile has some large advantages compared to using the browser's Save As functionality:

If you find this text helpful, please, support me and this website by signing my guestbook.