9/22/2019 GitHub - gildas-lormeau/SingleFile: Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a s…
gildas-lormeau / SingleFile
Dismiss
Join GitHub today
GitHub is home to over 40 million developers working together to host and
review code, manage projects, and build software together.
Sign up
Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a single HTML file
# browser # archive # auto-save # chrome # add-on # firefox # offline-reading # osint # web-extension # chrome-extension # firefox-addon # puppeteer # selenium # nodejs
# save-html # maff # snapshot # screenshot # javascript # mhtml
3,817 commits 1 branch 0 releases 10 contributors AGPL-3.0
Branch: master New pull request Find File Clone or download
gildas-lormeau added support of #! links Latest commit 9bbb25a 9 hours ago
.github moved file 19 days ago
_locales Fix German locale 15 days ago
cli refactored code 6 days ago
common fixed conflict with Prototype.js in puppeteer 6 days ago
extension refactored saveTabs 13 hours ago
lib added support of #! links 9 hours ago
.eslintrc.js stricter rules 11 months ago
.gitignore fixed implementation of script injection in frame contents 8 months ago
LICENSE added LICENSE 5 months ago
README.MD updated table 9 hours ago
build-extension.sh fixed build script 28 days ago
faq.md updated answer 10 days ago
manifest.json bump version 11 hours ago
privacy.md added link to the history 5 months ago
README.MD
SingleFile
SingleFile is a Web Extension compatible with Chrome, Firefox (Desktop and Mobile), Chromium-based Edge, Vivaldi, Brave,
Waterfox, Yandex browser, and Opera. It helps you to save a complete web page into a single HTML file.
Table of Contents
Demo
Install
Getting started
Additional notes
FAQ
Release notes
Known issues
https://github.com/gildas-lormeau/SingleFile 1/5
9/22/2019 GitHub - gildas-lormeau/SingleFile: Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a s…
Troubleshooting unknown issues
Command Line Interface
SingleFileZ
File format comparison
Statistics (Firefox)
Integration with WebKit
Privacy policy
Contributors
Icons
Code derived from third party projects
License
Demo
Install
SingleFile can be installed:
via the Firefox Add-ons website: https://addons.mozilla.org/addon/single-file,
via the Chrome Web Store: https://chrome.google.com/extensions/detail/mpiodijhokgodhhofbcjdecpffjipkle,
by downloading the zip file (https://github.com/gildas-lormeau/SingleFile/archive/master.zip) and installing it manually.
Getting started
Wait until the page is fully loaded.
Click on the SingleFile button in the extension toolbar to save the page.
Additional notes
To save multiple tabs, select them first and click on the SingleFile button.
Open the context menu by right-clicking the SingleFile button in the extension toolbar or on the webpage. It allows you
to save:
https://github.com/gildas-lormeau/SingleFile 2/5
9/22/2019 GitHub - gildas-lormeau/SingleFile: Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a s…
the current tab,
or the selected content,
or the selected frame.
You can also process multiple tabs in one click and save:
the selected tabs,
or the unpinned tabs,
or all the tabs.
The context menu also allows you to activate the auto-save of:
the current tab,
or the unpinned tabs,
or all the tabs.
You can interrupt the saving progress by clicking on the SingleFile button when processing a page.
With auto-save active, pages are automatically saved every time after being loaded (or before being unloaded if not).
Right-click on the SingleFile button and select "Options"/"Manage extension" to open the options page.
The default save folder is the download folder configured in your browser, cf. about:preferences in Firefox and
chrome://settings in Chrome.
You can use the shortcut Ctrl+Shift+Y to save the current tab or the selected tabs. Go to chrome://extensions/shortcuts
to change it in Chrome.
See the extension help in the options page for more detailed information about the options and technical notes.
FAQ
See https://github.com/gildas-lormeau/SingleFile/blob/master/faq.md
Release notes
See https://addons.mozilla.org/firefox/addon/single-file/versions/
Known Issues
All browsers:
For security reasons, you cannot save pages hosted on https://chrome.google.com, https://addons.mozilla.org and
some other Mozilla domains. When this happens, 🛇 is displayed on top of the SingleFile icon.
For security reasons, SingleFile is sometimes unable to save the image representation of canvas and snapshots of
video elements.
The last saved path cannot be remembered by default. To circumvent this limitation, disable the option "Misc > save
pages in background".
The following characters are replaced with _ in file names: ~ , \ , ? , % , * , : , " , < , >
Chrome:
You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a
saved page, or to save a page stored on the filesystem.
If the file name of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3.html", disable the option
"Misc > save pages in background". Reinstalling the browser may also fix this issue.
Disabling the option "File name > open the "Save as" dialog to confirm the file name" will work if and only if the
option "Ask where to save each file before downloading" is disabled in chrome://settings/downloads.
Firefox:
The "File name > file name conflict resolution" option does not work if set to "prompt for a name"
Waterfox
When opening pages saved with the option "Images > group duplicate images together" enabled, some duplicate
images might not displayed. It is recommended to disable this option.
Troubleshooting unknown issues
Please follow these steps if you find an unknown issue:
Save the page in incognito.
https://github.com/gildas-lormeau/SingleFile 3/5
9/22/2019 GitHub - gildas-lormeau/SingleFile: Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a s…
If saving page in incognito did not fix the issue, reset SingleFile options.
If resetting options did not fix the issue, restart the browser.
If restarting the browser did not fix the issue, try to disable all other extensions to see if there is a conflict.
If there is a conflict then try to determine against which extension(s).
Please report the issue with a short description on how to reproduce it here: https://github.com/gildas-
lormeau/SingleFile/issues.
Command Line Interface
You can save web pages to HTML from the command line interface. See here for more info: https://github.com/gildas-
lormeau/SingleFile/blob/master/cli/README.MD.
You can also convert MAFF pages to HTML. For this, you must use specific versions of SingleFile CLI and Firefox. See here
for more info: https://github.com/gildas-lormeau/SingleFile-MAFF2HTML.
SingleFileZ
SingleFileZ is a fork of SingleFile that allows you to save a webpage as a self-extracting HTML file. This HTML file is also a
valid ZIP file which contains the resources (images, fonts, stylesheets and frames) of the saved page. This ZIP file can be
unzipped on the filesystem in order, for example, to view the page in a browser that would not support pages saved with
SingleFileZ.
More info here: https://github.com/gildas-lormeau/SingleFileZ
File format comparison
HTML HTML Webarchive
MAFF MHTML HTML+folder
(SingleFile) (SingleFileZ) (Safari)
Pages are saved as a single file ✓ ✓ ✓ ✓ ✓
HTML and styles are minified ✓ ✓
Unused HTML and styles are
✓ ✓
removed from files
Binary resources are not encoded
✓ ✓ ✓ ✓
in base 64
Files are compressed ✓ ✓
Files can be viewed without
✓ ✓* ✓** ✓*** ✓
installing any extension
Files can be viewed without
✓ ✓ ✓ ✓ ✓
running JavaScript
Files can be unzipped to extract
✓ ✓ n/a
resources and view pages
Files contains the text of the
page (plain or formatted) which ✓ ✓**** ✓ ✓ ✓
can be indexed
Notes
a switch must be passed from the command line in Chromium-based browsers and an option must be enabled in
*
Safari
** only in Chromium-based browsers and Internet Explorer
*** only in Safari
**** an option must be enabled in the extension
Statistics (Firefox)
https://github.com/gildas-lormeau/SingleFile 4/5
9/22/2019 GitHub - gildas-lormeau/SingleFile: Web Extension for Firefox/Chrome and CLI tool to save a faithful copy of a complete page as a s…
See https://addons.mozilla.org/firefox/addon/single-file/statistics/?last=90
Integration with WebKit
Here is a Swift application (for macOS) made by @captaindavepdx that illustrates how to use SingleFile with WebKit:
https://github.com/captaindavepdx/SingleFileMacOS
Privacy Policy
See https://github.com/gildas-lormeau/SingleFile/blob/master/privacy.md
Contributors
Chinese translation done by yfdyh000 (https://github.com/yfdyh000), KrasnayaPloshchad
(https://github.com/KrasnayaPloshchad), frostblazergit (https://github.com/frostblazergit)
Traditional Chinese translation done by frostblazergit (https://github.com/frostblazergit)
German translation done by womotroll (https://github.com/womotroll), bannmann (https://github.com/bannmann)
Japanese translation done by Shitennouji(四天王寺) (https://github.com/Shitennouji)
Polish translation done by xesarni (https://github.com/xesarni)
Russian translation done by rstp14 (https://github.com/rstp14), kramola-RU (https://github.com/kramola-RU)
Spanish translation done by strel (https://github.com/strel)
Code derived from third party projects
csstree: https://github.com/csstree/csstree
postcss-media-query-parser: https://github.com/dryoma/postcss-media-query-parser
UglifyCSS: https://github.com/fmarcia/UglifyCSS
parse-srcset: https://github.com/albell/parse-srcset
parse-css-font: https://github.com/jedmao/parse-css-font
Icons
Icon made by Kiranshastry from Flaticon is licensed by CC 3.0 BY
License
SingleFile is licensed under AGPL. Code derived from third-party projects is licensed under MIT. Please contact me at
gildas.lormeau <at> gmail.com if you are interested in licensing the SingleFile code for a commercial service or product.
Suggestions are welcome :)
https://github.com/gildas-lormeau/SingleFile 5/5