gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
15.71k stars 1.02k forks source link
annotations archive archiver auto-save browser chrome chrome-extension cli firefox firefox-addon javascript offline-reading osint puppeteer screenshot selenium self-extracting self-extracting-zip snapshot web-clipper

SingleFile

SingleFile is a Web Extension (and a CLI tool) compatible with Chrome, Firefox (Desktop and Mobile), Microsoft Edge, Safari, 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

https://user-images.githubusercontent.com/396787/156664907-cc458e35-f41b-45ca-91eb-372213812b44.mp4

Install

SingleFile can be installed from stores of:

You can also download the zip file (https://github.com/gildas-lormeau/SingleFile/archive/master.zip) of the project and install it manually by unzipping it somewhere on your disk and following these instructions:

Getting started

Additional 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

Troubleshooting unknown issues

Please follow these steps if you find an unknown issue:

Command Line Interface (SingleFile CLI)

You can save web pages to HTML from the command line interface. See here for more info: https://github.com/gildas-lormeau/single-file-cli.

Integration with user scripts

You can execute a user script just before (and after) SingleFile saves a page. For more info, see https://github.com/gildas-lormeau/SingleFile/wiki/How-to-execute-a-user-script-before-a-page-is-saved.

File format comparison

HTML Self-extracting ZIP MHTML Webarchive (Safari) HTML+folder
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 page resources n/a
Files contains the text of the page (plain or formatted) which can be indexed ✓⁴

Footnotes:

¹ When using the "universal" self-extracting file format.

² Only in Chromium-based browsers, and Internet Explorer.

³ Only in Safari.

⁴ An option must be enabled in the extension.

Projects using/compatible with SingleFile

Privacy Policy

See https://github.com/gildas-lormeau/SingleFile/blob/master/privacy.md

Contributors

Code derived from third party projects

Icons

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 :)