SingleFile

Save a complete page into a single HTML file

Getting started - Additional notes - Options description - Annotation editor - Technical notes - Template variables - Known issues - Troubleshooting unknown issues - Contributors
  1. Getting started
    • Wait until the page is fully loaded.
    • Click on the SingleFile button in the extension toolbar to process and save the page.
    • You can click again on the button to cancel the action when processing a page.
  2. 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:
      • 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 highlight text, add notes, format and remove content before saving the page with the Annotation editor by selecting "Annotate and save the page..." in the context menu
    • With auto-save active, pages are automatically saved every time after being loaded (or before being unloaded if not).
    • Select "Save Selection" from the context menu without selecting any content first to display a selector that will help you choose content by hovering over it with the mouse.
    • Right-click on the SingleFile button and select "Options" to open the options page.
    • Enable the option "Destination > upload to Google Drive" to upload pages to Google Drive
    • You can use the customizable shortcut Ctrl+Shift+Y to save the current tab or the selected tabs. Go to about:addons and select "Manage extension shortcuts" in the cogwheel menu to change it in Firefox. Go to chrome://extensions/shortcuts to change it in Chrome..
    • The default save folder is the download folder configured in your browser, cf. about:preferences in Firefox and chrome://settings in Chrome.
  3. Options description

    You can customize SingleFile through the options page. Right-click on SingleFile button in the browser toolbar and select "Options"/"Manage extension" in the context menu to open the options page.

    Profiles

    • A profile is a set of user-defined options associated to a unique name.

      The drop-down list in the upper right of the options page allows you to select a profile and modify the associated options. The buttons next to the drop-down list allows you respectively to create, delete and rename a profile.

    • You can select the default profile through the context menu of SingleFile. The selection is persistent and applied to all tabs.

    • You can also override the default profile by associating a profile to a complete or partial URL. See the description of the Auto-settings rules feature for more info.

    User interface

    • Option: add entry in the context menu of the webpage

      Check this option to display an entry for SingleFile in the context menu of the webpage. The context menu of the SingleFile button in the extension toolbar is displayed whether this option is checked or not.

      It is recommended to check this option

    • Option: overlay a shadow on the page during processing

      Check this option to overlay a shadow on the page when SingleFile is retrieving page resources. This reminds you that you should not close the tab.

      It is recommended to check this option

    • Option: display an infobar when viewing a saved page

      Check this option to display the ℹ button at the top right of the page when viewing a saved page. By clicking this button, you can get more information about the saved date and open the original URL.

      It is recommended to check this option

    • Option: template of the infobar content

      The template allows you to customize the content displayed in the infobar. You can use any valid character, \n for new lines or \t for tabs. You can also use any variables from this list anywhere in the template. If the template or the resulting content is empty, the infobar will display the saved date by default.

      Template examples:

      • {url-href} ({date-iso}) will produce contents like "https://www.example.com (2018-09-15 11 06 03 PM)".
      • Title: {page-title} will produce contents like "Title: Example Domain" for a page having "Example Domain" as title.
    • Option: open a prompt dialog to edit the infobar content

      Check this option to display a prompt dialog in order to confirm the infobar content before saving the page.

    • Option: open saved pages in a new tab

      Check this option to display the saved page in a new tab. This option can be useful, for example, in order to check the page is properly saved.

    • Option: auto-close the tab after the page is saved

      Check this option to automatically close the tab after saving the page displayed inside.

    File name

    • Option: template

      The template allows you to customize the file name of saved pages. You can use any valid character and "/" to create sub-folders (with the option "save pages in background" active). You can also use any variables from this list anywhere in the template.

      Invalid characters are automatically transformed and collapsed to underscores. File names cannot exceed 192 characters and are truncated if longer. The invalid characters are: [ ~ + \ ? % * : | " < > and control characters from 0 to 31 in the ASCII table.

      Template examples:

      • {page-title} ({date-iso} {time-locale}).html will produce filenames like "Introduction to SingleFile (2018-09-15 11_06_03 PM).html" for a page having "Introduction to SingleFile" as title.
      • archives/{url-last-segment} - {date-iso} will produce filenames like "welcome - 2018-09-15" for a page hosted on https://example.com/welcome.html. The saved files will be saved in the sub-directory "archives".
      • archives/{year-locale}/{month-locale}/{day-locale}/{page-title}.html will produce filenames like "Introduction to SingleFile.html" stored into 3 sub-directories in the "archives" folder, one for each part of the save date (e.g. "2018/9/15/Introduction to SingleFile.html").
    • Option: max length (bytes)

      Specify the maximum length in bytes of the filename.

    • Option: open the "Save as" dialog to confirm the file name

      Check this option to display the "Save as" dialog in order to confirm the file name before saving the page. If the option "save pages in background" is unchecked then a prompt dialog will be displayed instead of the "Save as" dialog.

    • Option: file name conflict resolution

      Choose the most appropriate action when the filename of the saved page is conflicting with existing ones on the filesystem. The "skip duplicate files" action only detects duplicates among files downloaded during the current browsing session.

    HTML content

    • Option: compress HTML content

      Check this option to remove all HTML comments and unneeded tags, spaces, quotes and whitespace characters. Checking this option helps to reduce the size of the file without altering the document.

      It is recommended to check this option

    • Option: remove HTML imports

      Check this option to remove all link elements used to import HTML documents. Checking this option can help to reduce the size of the file without altering the document.

      It is recommended to check this option

    • Option: remove hidden elements

      Check this option to remove all hidden elements. Checking this option can help to reduce the size of the file without altering the document. It may also increase the CPU consumption and the time needed to save a page.

      It is recommended to check this option

    • Option: set content security policy

      Check this option to add a meta tag with a policy to block any external resources from being loaded.

      It is recommended to check this option

    • Option: remove frames

      Check this option to remove all frame and iframe elements. Checking this option can considerably reduce the size of the file without altering the document most of the time. It may also decrease the time needed to save a page.

    • Option: include infobar in the saved page

      Check this option to display the ℹ button at the top right of the page when viewing a saved page in a browser where SingleFile is not installed.

    • Option: save raw page

      Check this option to save the raw HTML file that the browser received. When this option is checked, the page will be saved as if JavaScript was disabled. Checking this option may alter the document.

      It is recommended to uncheck this option

    Stylesheets

    • Option: remove unused styles

      Check this option to remove all the CSS rules and styles that do not match any element in the saved page. Checking this option will not alter the document and can considerably reduce the size of the file. It will also increase the CPU consumption and the time needed to save a page.

      It is recommended to check this option

    • Option: remove stylesheets for alternative devices to screens

      Check this option to remove stylesheets that are not used for the screen display like stylesheets for print preview and speech synthesizers. Checking this option can help to reduce the size of the file.

    • Option: compress CSS content

      Check this option to minify CSS stylesheets. Checking this option can reduce size of the file without altering the document. It may also increase the CPU consumption and the time needed to save a page.

      It is recommended to uncheck this option

    Images

    • Option: group duplicate images together

      Check this option to avoid saving multiple times duplicate images. Checking this option should not alter the document in modern browsers and can considerably reduce the size of the file.

      It is recommended to check this option

    • Option: save deferred images

      Check this option to save all the deferred images that are not yet displayed. This may help to save all the images without scrolling the page. This feature does its best effort and is not guaranteed to work on all sites. It will also increase the time needed to save a page.

      It is recommended to check this option

    • Option: maximum idle time (ms)

      Specify the maximum delay of time to wait for deferred images. You can increase this value if for example the network or system conditions are degraded. You can also decrease this value otherwise.

    • Option: zoom out the page

      Check this option to save the entire content of a page by zooming out the page. This can help saving pages using infinite virtual lists for example.

      It is recommended to uncheck this option

    • Option: remove images for alternative screen resolutions

      Check this option to remove images that are alternatives in lower and/or higher resolutions to the ones displayed by default. Checking this option can considerably reduce the size of the file.

    Fonts

    • Option: remove unused fonts

      Check this option to remove all font CSS rules that do not match any content. Checking this option should not alter the document and can considerably reduce the size of the file.

      It is recommended to check this option

    • Option: remove alternative fonts

      Check this option to remove fonts that are alternatives to the ones used. Checking this option should not alter the document and can considerably reduce the size of the file.

      It is recommended to check this option

    Other resources

    • Option: remove scripts

      Check this option to remove all the JavaScript scripts. Unchecking this option may alter the document and may introduce privacy or security issues.

      It is recommended to check this option

    • Option: remove video sources

      Check this option to empty the "src" attribute of all video elements.

      It is recommended to check this option

    • Option: remove audio sources

      Check this option to empty the "src" attribute of all audio elements.

      It is recommended to check this option

    Destination

    • Option: save to filesystem

      Check this option to save the downloaded page on the filesystem of your computer.

      It is recommended to check this option

    • Option: copy to clipboard

      Check this option to copy the page to the clipboard.

      It is recommended to uncheck this option

    • Option: upload to Google Drive

      Check this option to save the page on Google Drive.

      The permissions requested by SingleFile allow it to access only to the files and folders it has created. When you uncheck this option, SingleFile revokes automatically its access to your Google Drive account.

      It is recommended to uncheck this option

    Annotation editor

    • Option: default mode

      Select the default mode when opening the annotation editor. The available choices are:

      • normal: default value
      • edit the page: enable the button
      • format the page: enable the button if the page can be formatted
      • remove elements: enable the button
      • remove external elements: enable the button

    • Option: apply the system theme when formatting a page in the annotation editor

      Uncheck this option if you do not want to apply the theme of the operating system or the browser (e.g. dark or light) when you click on the button "Format the page for better readability" in the annotation editor.

    • Option: warn if leaving page with unsaved changes

      Check this option to display a blocking popup when you leave the annotation editor (e.g. close the tab) without saving the changes.

      It is recommended to check this option

    • Option: edit page before saving

      Check this option to open the annotation editor before saving any page. Checking this option removes the entry "Annotate and save the page..." from the context menu.

      It is recommended to uncheck this option

    • Option: open the annotation editor when viewing a page saved with SingleFile

      Check this option to open the annotation editor when displaying a page saved by SingleFile.

      It is recommended to uncheck this option

    Bookmarks

    • Option: save the page of a newly created bookmark

      Check this option to save pages that you add into your bookmarks. Note that if the page is to be saved is not already displayed in a tab, SingleFile will open temporarily a new tab to save the page.

      It is recommended to uncheck this option

    • Option: link the new bookmark to the saved page

      Check this option to replace the URL of the page added into your bookmark with the file URI of the saved page on your disk.

      It is recommended to uncheck this option

    • Option: ignored folders

      Enter a list of bookmark folder names to ignore. The folder names must be separated with a comma. SingleFile will ignore bookmarks added in folders that contains these names.

    • Option: ignored folders

      Enter a list of bookmark folder names to allow. The folder names must be separated with a comma. SingleFile will only save pages added in folders that contains these names.

    Auto-save

    • Option: auto-save after page load or on page unload

      Check this option to auto-save pages after being loaded. If you browse to another page before the page is fully loaded then the page will be saved just before being unloaded. With this option active, you are guaranteed pages will always be saved. Some frame contents may be missing (if you checked "remove frames") when pages are saved before being unloaded.

    • Option: auto-save after page load

      Check this option to auto-save pages after being loaded.

    • Option: auto-save on page unload

      Check this option to auto-save pages before being unloaded instead of saving pages after being loaded. With this option active, you are guaranteed pages will always be saved but some frame contents may be missing (if you checked "remove frames").

    • Option: auto-save on tab discard

      Check this option to auto-save pages when discarding a tab. Some frame contents may be missing (if you checked "remove frames").

    • Option: auto-save on tab removal

      Check this option to auto-save pages when closing a tab. Some frame contents may be missing (if you checked "remove frames").

    • Option: auto-save waiting delay after load (s)

      Specify the delay in seconds to wait before saving a page when the "auto-save on page load or on page unload" or "auto-save on page load" is checked.

    • Option: auto-save periodically

      Check this option to auto-save pages periodically after load.

    • Option: period (s)

      Specify the delay in seconds to wait before each page saving when the "auto-save periodically" option is checked.

    • Option: save the page with SingleFile Companion

      Check this option to delegate the saving process to SingleFile Companion. It is a program that runs outside the browser and can help to make the saving process more transparent. It also allows the pages to be saved in another directory than the download directory. You can find more info here

    Misc.

    • Option: set a maximum size for embedded resources (MB)

      Check this option to remove from the saved page embedded resources (i.e. images, stylesheets, scripts and iframes) that exceeds a given size.

    • Option: maximum size (MB)

      Specify the maximum size of embedded resources in megabytes.

    • Option: pass \"Referer\" header on cross-origin errors

      Check this option to pass the HTTP header "Referer" with the "origin" policy after an 401, 403, or 404 HTTP error when downloading a cross-origin resource. You should enable this option if you cannot download resources blocked by a hotlink protection.

      It is recommended to uncheck this option

    • Option: add proof od existence

      Check this option to create a worldwide proof of the existence of the page you want to save.

      • What is a proof of existence (data anchoring)?
        Data anchoring consists in building a time-stamped proof of existence for a data by linking it to a tamper resistant and time-stamped blockchain. Data anchoring implementation relies on the resilience and immutability of the Bitcoin blockchain to provide the best possible security level
      • How does this protect my data?
        The anchoring mechanism only handles data impressions. Your data remains where you calculate the fingerprints, i.e. in the browser. Their confidentiality is totally preserved.
      • The day after your backup you can get freely the proof receipt here: gildas-lormeau.github.io/singlefile-woleet/index.html. A proof receipt will be used to verify the validity of the evidence

      More information doc.woleet.io

    • Option: save pages in background

      Uncheck this option if you get invalid file names like "37bec68b-446a-46a5-8642-19a89c231b46.html" or interrupted downloads when saving pages. You can also uncheck this option if you want the "Save as" dialog to remember the last saved path. Unchecking this option prevent using sub-directories in filename templates.

      It is recommended to check this option

    • Option: display stats in the console after processing

      Check this option to display stats about processing in the JavaScript developer tools of your browser. Checking this option may increase the CPU consumption and the time needed to save a page.

      It is recommended to uncheck this option

    Auto-settings rules

    • The auto-settings rules let you associate a complete or partial URL with a profile. It also allows to associate a specific profile for the auto-save, or to disable it (check "display 'Auto-save profile' column"). When two or more rules match a URL of a page to save, the rule with the longest URL will be chosen. The special profile "-" means the current profile.
    • You can use the special value "*" as URL to create a rule that applies to all URLs
    • You can use regular expressions by prefixing the URL with "regexp:" (e.g. "regexp:.*\.com" to match all URLs containing ".com"). When zero or more rules based on URLs and one or more rules based on regular expressions match a URL, the longest rule based on regular expression will be chosen.

    Form buttons

    • synchronize options

      Check this option to synchronize your options and make them available in all instances of the browser you are logged into, on different devices.

    • Reset

      Reset all options to their default values.

  4. Annotation editor

    The annotation editor can be opened by selecting "Annotate and save the page" in the context menu or by enabling the option "Annotation editor > edit page before saving". It allows you to:

    • add notes by clicking one of these buttons:
    • hide or show notes by clicking the button
    • highlight text by clicking one of these buttons:
    • hide or show highlighted text by clicking the button
    • remove text highlighting by clicking the button
    • edit the page by clicking the button
    • format the page to improve readability (when possible) by clicking the button
    • remove contents by clicking the button (inner elements) or (outer elements)
    • undo removes by clicking the button or the button (undo all)
    • redo removes by clicking the button
    • print the page by clicking the button or by pressing Ctrl-P
    • save the page by clicking the button or by pressing Ctrl-S


    You can use the following keyboard shortcuts when removing contents with or :

    • Tab: expand the selection
    • Shift-Tab: reduce the selection
    • Space: remove the selected element
    • Ctrl-Z: undo the last removal
    • Ctrl-Shift-Z: redo the last removal
    • Ctrl: select/unselect multiple elements, releasing the Ctrl key validates the selection
    • Shift: temporarily reverse the type of removal (i.e. removal of inner elements or removal of outer elements) on the last selected element and reset the other selected elements if any
    • Escape: reset selected elements

  5. Template variables

    The template variables are used to customize the infobar content or the file name of a saved page. They help to insert dynamic values like the save date or the page title.

    You can limit the length of a dynamic value by adding [maxByteSize] just after the variable name. The maxByteSize value is the maximum length of the value in bytes (e.g. `{page-title}[20]` to limit the title to 20 bytes).

    • {page-title}: the title of the page
    • {page-heading}: the content of the H1 tag in the page
    • {page-language}: the language of the page
    • {page-description}: the description of the page
    • {page-author}: the author of the page
    • {page-creator}: the creator of the page
    • {page-publisher}: the publisher of the page
    • {datetime-iso}: the save date and time in the ISO format (e.g. "2018-09-15T22_38_26_317Z")
    • {datetime-utc}: the save date and time in UTC format (e.g. "Sat, 15 Sep 2018 22_38_26 GMT")
    • {datetime-locale}: the localized value of the date and time (e.g. "9_16_2018, 12_54_31 AM")
    • {date-iso}: the save date in the ISO format (e.g. "2018-09-15")
    • {date-locale}: the localized value of the save date (e.g. "16_09_2018")
    • {time-iso}: the save time in the ISO format (e.g. "22_38_26_317")
    • {time-locale}: the localized value of the save time (e.g. "00_38_26")
    • {time-ms}: the save time is ms since the Unix Epoch (e.g. 1563582018000)
    • {day-utc}: the day of the save date in UTC format (e.g. "15")
    • {day-locale}: the localized value of the day (e.g. "15")
    • {month-utc}: the month of the save date in UTC format (e.g. "09")
    • {month-locale}: the localized value of the month (e.g. "09")
    • {year-utc}: the year of the save date in UTC format (e.g. "2018")
    • {year-locale}: the localized value of the year (e.g. "2018")
    • {hours-utc}: the hour of the save date in UTC format (e.g. "20")
    • {hours-locale}: the localized value of the hour (e.g. "22")
    • {minutes-utc}: the minutes of the save date in UTC format (e.g. "38")
    • {minutes-locale}: the localized value of the minutes (e.g. "38")
    • {seconds-utc}: the seconds of the save date in UTC format (e.g. "31")
    • {seconds-locale}: the localized value of the seconds (e.g. "31")
    • {visit-datetime-iso}: the visit date and time in the ISO format (e.g. "2018-09-15T22_38_26_317Z")
    • {visit-datetime-utc}: the visit date and time in UTC format (e.g. "Sat, 15 Sep 2018 22_38_26 GMT")
    • {visit-datetime-locale}: the localized value of the date and time (e.g. "9_16_2018, 12_54_31 AM")
    • {visit-date-iso}: the visit date in the ISO format (e.g. "2018-09-15")
    • {visit-date-locale}: the localized value of the visit date (e.g. "16_09_2018")
    • {visit-time-iso}: the visit time in the ISO format (e.g. "22_38_26_317")
    • {visit-time-locale}: the localized value of the visit time (e.g. "00_38_26")
    • {visit-time-ms}: the visit time is ms since the Unix Epoch (e.g. 1563582018000)
    • {visit-day-utc}: the day of the visit date in UTC format (e.g. "15")
    • {visit-day-locale}: the localized value of the day (e.g. "15")
    • {visit-month-utc}: the month of the visit date in UTC format (e.g. "09")
    • {visit-month-locale}: the localized value of the month (e.g. "09")
    • {visit-year-utc}: the year of the visit date in UTC format (e.g. "2018")
    • {visit-year-locale}: the localized value of the year (e.g. "2018")
    • {visit-hours-utc}: the hour of the visit date in UTC format (e.g. "20")
    • {visit-hours-locale}: the localized value of the hour (e.g. "22")
    • {visit-minutes-utc}: the minutes of the visit date in UTC format (e.g. "38")
    • {visit-minutes-locale}: the localized value of the minutes (e.g. "38")
    • {visit-seconds-utc}: the seconds of the visit date in UTC format (e.g. "31")
    • {visit-seconds-locale}: the localized value of the seconds (e.g. "31")
    • {url-href}: the URL of the page (e.g. "http://example.com/category/index.html")
    • {url-href-flat}: the URL of the page with replaced slashes (e.g. "http__example.com_category_index.html")
    • {url-pathname}: the path name of the URL (e.g. "category/index.html")
    • {url-pathname-flat}: the path name of the URL with replaced slashes (e.g. "category_index.html")
    • {url-last-segment}: the last part of the pathname (without the extension) or the host if not found (e.g. "index")
    • {url-protocol}: the protocol of the URL (e.g. "https")
    • {url-host}: the host name + the port of the URL (e.g. "example.com_8080")
    • {url-hostname}: the host name of the URL (e.g. "example.com")
    • {url-port}: the port of the URL (e.g. "8080")
    • {url-username}: the user name of the URL (e.g. "john_doe")
    • {url-password}: the password of the URL (e.g. "qwerty123")
    • {url-search}: the search string of the URL (e.g. "order=ascending")
    • {url-search-<name>}: the query parameter "<name>" in the the search string of the URL (e.g. "url-search-order" will return "ascending" in the previous example)
    • {url-hash}: the hash of the URL (e.g. "chapter-2")
    • {url-referrer}: the URI of the page that "linked" to the page (e.g. "http://example.com")
    • {url-referrer-flat}: the URI of the page that "linked" to the page with slashed replaced (e.g. "http_example.com")
    • {bookmark-pathname}: the path name of the newly created bookmark (e.g. "My Bookmarks/Last Month") when the option "Bookmarks > save the page of a newly created bookmark" is enabled
    • {bookmark-pathname-flat}: the path name of the newly created bookmark with replaced slashes (e.g. "My Bookmarks_Last Month") when the option "Bookmarks > save the page of a newly created bookmark" is enabled
    • {tab-id}: the unique identifier of the tab (e.g. "326")
    • {tab-index}: the index of the tab in the window (e.g. "1")
    • {digest-sha-256}: the SHA-256 hash value of the entire page content (e.g. e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)
    • {digest-sha-384}: the SHA-384 hash value of the entire page content
    • {digest-sha-512}: the SHA-512 hash value of the entire page content
    • {profile-name}: the name of the profile used to save the page
  6. Technical notes
    • All images are converted into base64.
    • All resources except frame contents are injected in the document using data URI scheme.
    • Frame contents are injected as text in the document by using the srcdoc attribute.
  7. 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 filenames: ~, +, \, ?, %, *, :, |, ", <, >
    • Chromium-based browsers
      • You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, to save or to annotate a page stored on the filesystem.
      • If the filename of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3", 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 "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".
      • Sometimes, SingleFile is unable to save the contents of sandboxed iframes.
      • When processing a page from the filesystem, external resources (e.g. images, stylesheets, fonts etc.) will not be embedded into the saved page.
  8. Troubleshooting unknown issues

    Please follow these steps if you find an unknown issue:

    • Save the page in incognito.
    • 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 here with a short description on how to reproduce it.

    Suggestions are welcome :)

  9. Contributors
  10. Icons