v2.27.32026-11-18
SingleFile CLI 2.27.3
CLI fixes and improvements
- On Windows, the capture works again with a Chromium-based browser launched by the tool. In 2.27.1 and 2.27.2, every capture failed with "No available debugging port", unless --browser-server was used (#212 by @johanjohan).
- The browser launch is now tested on Windows before each release.
Co-authored by Claude (Claude Code)
v2.27.22026-11-18
SingleFile CLI 2.27.2
CLI fixes and improvements
- With Chromium, the screenshot embedded by --embed-screenshot no longer shows the top of the page again on long pages. The browser does not render more than 16,384 px of height in one capture, so a longer page is now captured in several regions which are joined into one image (#213 by @johanjohan). When --embed-screenshot-options is set, the page is still captured in one piece with the options given.
Co-authored by Claude (Claude Code)
v2.27.12026-11-18
SingleFile CLI 2.27.1
CLI fixes and improvements
- --embed-screenshot and --embed-pdf embed the screenshot and the PDF again. Since 2.18.1, the file was saved without them, and without any warning, unless a settings file defined removeAlternativeImages (#212 by @johanjohan).
- --remove-alternative-images given on the command line is no longer ignored when a settings file defines the same option.
- With Chromium, --browser-width and --browser-height now set the size of the viewport, as they already did with Firefox. They used to set the size of the window, and the browser kept 87 px of its height for itself: a page was laid out in 1280x633 by default, it is now laid out in 1280x720. --browser-device-width and --browser-device-height still take precedence.
- When the page crashes in Chromium during the capture (e.g. when it runs out of memory), the error is now "Page crashed" and it is reported at once. It used to be reported as a capture timeout, after the whole delay.
- With Firefox, a page that navigates to another URL from a script before its load event is now captured. The capture failed with a navigation error.
- A capture now checks that the browser it connects to is the one it launched. When several captures were started at the same time with Chromium, two of them could be given the same debugging port, and one of them failed.
- Updated single-file-core to 1.14.3:
- an imported stylesheet that is truncated or leaves a block, a string or a comment open no longer swallows the rules that follow it in the page
- the adopted stylesheets of a shadow root are now saved after its own <style> elements, which is their place in the cascade
Co-authored by Claude (Claude Code)
v2.27.02026-11-17
SingleFile CLI 2.27.0
New features
- New option --load-deferred-content-expand-viewport: expand the browser viewport to the height of the document while loading deferred content, and restore it before the page is read. By default, the page is only made to believe it is that tall. This option loads the content of pages that measure the viewport in a way the emulation does not reach (e.g. an element sized with the vh unit). No zoom-out is applied unless --load-deferred-content-min-zoom-factor is set. A page that does not react to the restored size is saved with the elements it sized from the tall viewport.
``
single-file https://www.example.com/gallery page.html --load-deferred-content-expand-viewport
`
- The unused CSS rules of the stylesheets found in shadow roots are now removed, they were always saved whole. On a Reddit thread with 240 comments, the saved page goes from 394 MB to 21 MB (gildas-lormeau/SingleFile#1514).
- The deferred content is now also loaded on a page that keeps the document at the size of the window and scrolls an inner element. Such a page was saved with its first rows only.
- An SVG file referenced by a use element is inlined in the page, the image was lost before.
CLI fixes and improvements
- Updated single-file-core to 1.14.1:
- a stylesheet containing :is() or :where() with an empty argument list no longer makes the save fail with "Cannot read properties of null (reading 'data')" (gildas-lormeau/SingleFile#2058 by @alekssmitt)
- with --selected-elements-selector`, the selected content is no longer saved as a blank page when it is displayed through the slots of web components (gildas-lormeau/SingleFile#2060 by @FvH01)
Co-authored by Claude (Claude Code)
v2.26.02026-11-10
SingleFile CLI 2.26.0
New features
- New option --remove-link-query-strings: remove the query strings of the links (a and area elements with a relative or http(s) URL), e.g. tracking parameters, session ids and signed URLs. The fragment is kept, and the other links (e.g. mailto:) and the form actions are left alone.
``
single-file https://www.example.com/article page.html --remove-link-query-strings
`
- New function %switch<value|case1|result1|case2|result2|...|default> in --filename-template: it compares value with each case and returns the matching result, or default when no case matches (gildas-lormeau/SingleFile#2052 by @TheGhost78).
`
single-file https://www.bbc.com/news --filename-template "%switch<{url-hostname-domain}|bbc|BBC|imdb|IMDb|%capitalize<{url-hostname-domain}>>.html"
`
CLI fixes and improvements
- Updated single-file-core to 1.12.0:
- pages using many web fonts are processed faster when the alternative fonts are removed, the parsed src lists and the font details are cached (gildas-lormeau/single-file-core#12 by @pirate)
- with --load-deferred-content-keep-zoom-level`, the sizes and positions reported to the page are scaled like the page, so pages that lay out their content from them are saved whole (gildas-lormeau/SingleFile#1919 by @noto10)
Co-authored by Claude (Claude Code)
v2.25.02026-11-06
New features
- New option --selected-elements-selector: save only the elements matching the given CSS selectors (comma separated), with their ancestors, like "Save selection" in the extension. The elements before them are hidden, the elements after them are removed, and --removed-elements-selector is applied afterwards. The whole page is saved when no element matches.
``
single-file https://www.example.com/article page.html --selected-elements-selector "main article"
`
Fixes
- Updated single-file-core to 1.11.0: when saving a selection, the elements before the selected content are hidden with visibility: hidden and an empty box instead of display: none`, so the selected content keeps its place on pages laid out with CSS grids (gildas-lormeau/SingleFile#1932)
v2.24.02026-11-06
SingleFile CLI 2.24.0
New features
- New option --load-deferred-content-keep-emulated-screen-size: while loading deferred content, the page is made to believe the screen is as tall as the whole document, and the real size is restored before the page is read. With this option the emulated size is kept until the page has been saved. It helps saving pages that only keep on screen the content scrolled to, e.g. the timelines of x.com, at the cost of saving elements sized from the screen height, e.g. full-screen covers, at the emulated size (gildas-lormeau/SingleFile#2048 by @cheese529).
``
single-file https://x.com/i/history/likes likes.html --browser-server http://127.0.0.1:9222 --load-deferred-content-keep-emulated-screen-size=true
`
CLI fixes and improvements
- The default value of --accept-header-image starts with image/jxl, like the Accept header of browsers supporting JPEG XL
- Updated single-file-core to 1.10.0: SVG sprite fragments referenced from CSS url() values and from image attributes are saved on their own instead of the whole sprite, the sandbox attribute of saved frames no longer carries a token Safari rejects nor a duplicated one, and the xmlns` attribute of extracted sprite fragments is declared in the XMLNS namespace
Co-authored by Claude (Claude Code)
v2.23.02026-11-04
SingleFile CLI 2.23.0
New features
- New options --custom-stylesheet-file and --embedded-script-file: the path of a file holding the CSS of --custom-stylesheet or the code of --embedded-script, for rules or scripts too long or too awkward to quote on the command line. Each one is refused together with its inline form.
``
single-file https://www.example.com/scorecard scorecard.html --custom-stylesheet-file=tabs.css --embedded-script-file=tabs.js
`
CLI fixes and improvements
- Updated single-file-core to 1.9.1: the first occurrence of a repeated inline stylesheet is no longer kept in full next to its shared copy when --group-duplicate-stylesheets is enabled, subset fonts produced by --remove-unused-glyphs` keep the glyphs CoreText needs to align small text on macOS, and the serializer writes processing instructions and CDATA sections instead of the word "undefined"
Co-authored by Claude (Claude Code)
v2.22.02026-11-02
SingleFile CLI 2.22.0
New features
- New option --embedded-script: JavaScript code inserted at the end of the saved page. It is kept even when --block-scripts removes the scripts of the page, it is not inserted into the frames, and it does not run while the page is saved (use --browser-script for that). Combined with --custom-stylesheet to keep hidden elements, it lets you restore a behaviour the saved page lost with its scripts, e.g. switching the tabs of a scorecard or a product page:
``
single-file --custom-stylesheet "[role=tabpanel][hidden]{display:block}" --embedded-script "const panels = document.querySelectorAll('[role=tabpanel]'); ..." https://example.com/page
``
CLI fixes and improvements
- Updated single-file-core to 1.9.0
Co-authored by Claude (Claude Code)
v2.21.12026-11-02
SingleFile CLI 2.21.1
CLI fixes and improvements
- Updated single-file-core to 1.8.1
- Filename templates: the spaces written in the template are kept instead of being collapsed into a single space (#2042 by @beachbum9). Tabs, line breaks and other whitespace characters are still replaced with spaces, one for one.
- Filename templates: a substitution rule that removes characters, and the "replace emojis with text" option, no longer leave two spaces around the removed character or a space before the file extension.
- Filename templates: a folder name ending with a dot no longer loses its separator ("docs./file" was saved as "docs._file"), a ".." segment is removed as a whole segment instead of wherever "../" appears, and trailing dots and spaces are removed from every folder name.
- A missing image is no longer requested a second time when its currentSrc is the same URL as its src, which doubled the network wait on slow or unavailable images (gildas-lormeau/single-file-core#11 by @pirate)
Co-authored by Claude (Claude Code)