v1.37.02026-11-10
Changes
- Added the %switch<value|case1|result1|case2|result2|...|default> function in the filename template: it compares value with each case and returns the matching result, or default when no case matches, e.g. %switch<{url-hostname-domain}|bbc|BBC|imdb|IMDb|%capitalize<{url-hostname-domain}>>; the help page documents it (#2052)
- The script embedded in annotated pages to display, move, resize and collapse the notes is now built from single-file-core (single-file-notes.js) and minified, instead of being generated from the source of the editor
- Pages using many web fonts are processed faster when the option "remove alternative fonts to the ones displayed" is enabled: the parsed src lists and the font details are cached (gildas-lormeau/single-file-core#12)
Fixes
- A page auto-saved on unload from a tab being closed is saved again: the content was received without the tab of the sender, the save failed and its entry stayed in the pending saves with the "processing" status (#2053)
- The first auto-save of a browser session is removed from the pending saves when the page has been saved (the task id 0 was read as "no task"), and the auto-save entries of pages that went away without sending their content are removed when the tab is closed, displays another page, or does not answer (#2053)
- The unload listener of the auto-save is registered as soon as the options are received instead of on DOMContentLoaded
- With "auto-save after page load or on page unload" and "auto-save on tab removed" both enabled, a page left before being saved is no longer lost; with "auto-save on page unload" and "auto-save on tab removed" both enabled, closing the tab no longer saves the page twice
- With "auto-save on tab discard" enabled, hiding a tab no longer leaves the data-single-file-* marker attributes of the capture in the page, the capture kept for a hidden tab is released when the tab is closed, and a tab discarded before its capture is received is saved
- In pages saved with notes, releasing the mouse after resizing or moving a note no longer leaves the note following the pointer: the embedded script referenced a function that only exists in the editor (#2054, regression from 2023; the pages already saved must be opened in the editor and saved again to get the fixed script)
- In the editor, removing the selected note no longer keeps it as the selected note, adding a note selects it, and the anchor of a note is no longer looked for in the notes or in the masks
- With "Deferred content > keep the 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 (#1919)
- The option "skip the save if the file exists" only applies to the files saved in the download folder: saves to the annotation editor, the clipboard and the companion are no longer cancelled by a file of the same name in the download history, and a skipped save no longer opens the saved page nor requests a proof of existence
- Updated single-file-core to 1.12.0
v1.36.02026-11-06
Changes
- Added the option "Deferred content > keep the emulated screen size during the capture" (loadDeferredContentKeepEmulatedScreenSize, off by default). While loading the deferred content, SingleFile makes the page believe the screen is as tall as the whole document and restores the real size before reading the page. With this option, the emulated size is kept until the page has been saved, so pages that unmount the content scrolled out of view (e.g. the timelines of x.com) are saved whole, at the cost of saving elements sized from the screen height (e.g. full-screen covers) at the emulated size (#2048)
- The tooltips of the two cut buttons of the annotation editor now say what the buttons do: "Remove the element under the mouse (red outline)" and "Keep the element under the mouse and remove everything else (green outline)"; the new option label and the tooltips are translated in all the languages
- The default Accept header of image requests starts with image/jxl, like the one of browsers supporting JPEG XL
Fixes
- Saving a selection on pages laid out with CSS grids using auto rows (e.g. the job pages of LinkedIn) no longer produces an empty page showing only the background color: the elements located before the selection are hidden with visibility: hidden and an empty box instead of display: none, so the selected content keeps its place in the layout (#1932, single-file-core 1.10.1)
- SVG sprite fragments referenced from CSS url() values (e.g. mask-image: url(sprite.svg#icon)) and from image attributes (e.g. <img src="sprite.svg#icon">) are cut out of the sprite and saved on their own, like the ones referenced from <use href>; the whole sprite used to be saved in their place and displayed as a grid of every icon (single-file-core 1.10.0)
- The sandbox attribute of saved frames no longer carries the allow-presentation token, which Safari rejects with a console warning, nor a duplicated allow-popups token (single-file-core 1.10.0)
- The xmlns attribute of extracted sprite fragments is declared in the XMLNS namespace, so an XML serializer accepts it (single-file-core 1.10.0)
- Updated single-file-core to 1.10.1
v1.35.02026-11-04
Changes
- Vietnamese translation (#2045 by @dinhkarate)
- Help page: the paragraph about removing contents in the annotation editor explains the red and green dotted outlines (the element that will be removed, or the element that will be kept while everything else is removed) and that the Tab key moves the outline to the enclosing element without moving the mouse
- Core 1.9.1: the HTML serializer writes processing instructions as <?target data?> and CDATA sections as text instead of the word "undefined"
Fixes
- Two startup races in the background script, visible as TypeError: undefined is not an object (evaluating 'de.get') and (evaluating 'e[n]') in Safari's extension pane (#2047 by @aqres): a content script initializing while the background was still reading its settings left that tab without auto-save until its next navigation, and a tab replaced before the first save threw in the tab data handler
- Safari and MV2 builds: the options page could not read or save the external capture permissions ("Unauthorized sender" errors), because the browser polyfill did not expose runtime.id (#2047)
- The localized help page is chosen from the list of available translations instead of probing the extension resources, which Safari reported as "Unable to find help_xx.html" errors (#2047)
- Core 1.9.1: groupDuplicateStylesheets also replaces the first occurrence of a repeated inline stylesheet with a placeholder; the origin of each group was kept in full next to the shared copy in the head, so a page built from components that all adopt the same stylesheet carried it twice
- Core 1.9.1: removeUnusedGlyphs keeps the outlines of "X" and "x" in every subset font; CoreText derives the alignment zones it snaps small text to from these two glyphs, so a font without them rendered every character slightly lower and lighter on non-Retina screens on macOS
v1.34.02026-11-02
Changes
- The options page displays a warning when the extension is not allowed to access local files, with the steps to allow it: "Access local files on your computer" in the permissions of the extension since Firefox 153, where it is off by default, and "Allow access to file URLs" in Chromium-based browsers. Without it, the infobar is not displayed on saved pages and pages opened from the filesystem cannot be saved. The help page and the FAQ describe it too (#2014)
- New hidden option embeddedScript (core 1.9.0), set from the options editor: JavaScript code inserted at the end of the saved page, kept even though the scripts of the page are removed. Combined with a custom stylesheet that keeps hidden elements, it lets a user restore the tabs of a saved page, for example
- Help page: the examples of the time template variables use ":" instead of "_" (#2041 by @lstngr), and the ISO variables are documented as UTC (#2042)
- Translations: Russian reviewed (#2039 by @solokot), Swedish reviewed (#2040 by @NickWick13), German label of the proof of existence option fixed, missing translations and spelling mistakes fixed in several locales
Fixes
- Filename templates (core 1.8.1): the spaces written in the template are kept instead of being collapsed into a single space; tabs, line breaks and other whitespace characters are still replaced with spaces, one for one (#2042)
- Filename templates (core 1.8.1): 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 (core 1.8.1): 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 ("Loading.../page" was saved as "Loading.page"), and trailing dots and spaces are removed from every folder name; the filename preview on the options page follows the same rules
- 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)
v1.33.02026-10-28
Changes
- Options synchronization: a profile larger than the 8 KB per-item limit of the browser's sync storage is now split over several items and reassembled on read, so a long filename replacement table no longer prevents importing or synchronizing settings (#2038)
- Filename templates (core 1.8.0): the page text variables decode HTML character references a second time, so a site that escapes its title twice no longer leaves & in the filename (#2036)
Fixes
- Importing settings or enabling synchronization no longer deletes the current settings when the write to sync storage fails; the error is now shown on the options page and the synchronization box is left unticked (#2038)
- The proof of existence hash (Woleet) is computed on the final file when the self-extracting archive is enabled, so the saved file can be verified; it used to be computed on the HTML before packaging and never matched the file on disk (#2028)
- Filename templates (core 1.8.0): [Nch] now keeps N characters, counted by code point, instead of behaving like [N] (#2037)
Notes
- A profile split over several sync items is read as empty by an older version of the extension on another device until that device updates
v1.32.02026-10-27
Changes
- New option "remove unused glyphs" in the Fonts section (experimental, off by default): the glyphs the page does not draw are removed from the embedded TrueType, WOFF and WOFF2 fonts. The characters kept are those the page text, the CSS-generated content, the list markers and the text-transform values draw, plus their canonical decompositions and compositions, their bidi mirrors and their variation selectors, so a font that shapes them with ligatures or marks keeps the glyphs it needs. A font is left untouched when it is a CFF or a variable font, when it declares a MATH table, when the rewritten font is not smaller, or when the browser fails to load it. WOFF2 fonts need Brotli in the browser's Compression Streams, available in Firefox 147 and later; in Chrome they are kept as they are. On the sites tested the saved page shrinks by 3% to 30%.
- New %titlecase template function for filenames: the first letter of every word is uppercased, the other letters are left as typed (#2026).
- Whitespace runs in a filename are collapsed to a single space after the replacement rules are applied, so a removed character no longer leaves a double space behind (#2025).
- The labels of the options page start with a capital letter (#2013).
---
Fixes
- The filename replacement rules now match characters outside the Basic Multilingual Plane, so a rule written to remove emojis removes every one of them (#2025).
- The repair of invalid nesting no longer drops the text between displaced siblings: a sentence built as <div> blocks inside a <p>, one per word, separated by spaces, was saved without its spaces (#1935).
- A page holding a very large amount of text no longer fails with RangeError: Invalid array length in the "remove unused fonts" step (#2029).
- A stylesheet holding large embedded resources no longer costs a multiple of their size in memory: the url() codec of the vendored css-tree built every value one character at a time, and the syntax tree kept every intermediate node alive. Contributed by @pirate in single-file-core#10.
- A stylesheet modified by the page's scripts no longer loses the rules under a media or container query whose value Firefox serializes as infinity * 1px, the way styled-components writes an open-ended last breakpoint.
- A styled XML document no longer hangs the capture.
- Text can be selected again in the options page on Firefox (#2027).
- The editor configures the path of its zip worker explicitly, so the zip.js 2.8 update no longer makes it fall back to the main thread.
v1.31.52026-10-19
Fixes
- Update single-file-core to 1.6.40: a stylesheet modified by the page's scripts is read back through its CSSOM serialization, and Firefox serializes a media or container feature value above the largest float as (max-width: infinity * 1px), which no browser parses back, so every rule under such a query was dead in the saved page. styled-components writes its open-ended last breakpoint that way, and on liberation.fr the saved page lost the column gaps of the main grid at wide viewports, so the columns and their photos widened. The value is now written as the largest finite length, which every browser reads back. Firefox-only release: the Chromium and Edge builds are not affected, since Chrome serializes the value as a finite length already.
v1.31.42026-10-19
Fixes
- A resource answered with a server error (status 500 or more) is requested once more without the cache, in the page and in its frames. The fetch runs in force-cache mode, which replays a stored response without revalidating it whatever its status, so an error served during a short outage came back in every save for as long as the cache entry lived. The frames now receive the cache mode of the retry.
- Update single-file-core to 1.6.39:
- A @font-face rule whose src list holds an item that fails to parse no longer loses its font. Browsers parse the list item by item and skip only the broken one, so a comma typed where a semicolon belonged (src: url(a.woff) format("woff"), font-display: swap;, the way every "Libé" font on liberation.fr is written) still loads the font on the live page while the saved page kept a URL that pointed nowhere. The valid sources are now kept and embedded.
- The "Remove unused fonts" option no longer removes a font the page draws only through a list marker (the numbers of an ordered list, a ::marker icon) or a text-transform (É drawn from an é): the characters a marker and a transform draw are now reported as drawn, in Chrome and Firefox alike.
- "Remove unused styles" also removes the custom properties nothing reads, such as an icon set declared as --icon: url() properties under :root whose rules were removed: on linkedin.com this saves 1.25 MB and 272 inline SVGs with no computed style changed.
- Resources are fetched at most 6 at a time per host, what browsers allow over HTTP/1.1. Over HTTP/2 and HTTP/3 every resource of a page left at once, and a site behind a rate limiter answered 429 to a quarter of them.
- An image still loading when the page is saved is kept instead of being dropped as hidden because its box measured 0 × 0.
- A frame that failed to load (blocked by X-Frame-Options, unreachable host, dead embed) is given up after 2 s instead of 5 s before the page is saved. The :first-letter style is read only on block containers when collecting the used fonts.
v1.31.32026-10-18
Fixes
- The "domain profile" menu no longer selects "Default Settings" on a domain without a rule when another global profile is selected, and a wildcard rule is no longer shown as a domain rule when a tab is activated. The menu refresh now follows the same rules as the menu creation (#1898, #2024, thanks @TXyy2023).
- Update single-file-core to 1.6.34: an auto-save, or a "Save frame", no longer fails silently when the content holds a video without a poster whose frame could not be captured (cross-origin video, or no decoded frame yet). The capture threw when it tried to draw the frame without a live document, so no file was saved. A frame save now draws the poster in the window of the page, and an auto-save writes a blank poster sized like the video.
v1.31.22026-10-17
Fixes
- Update single-file-core to 1.6.32:
- "Remove unused fonts" no longer drops the unicode-range subsets holding the icon glyphs of fonts that set them through a custom property, such as Font Awesome 7 (.fa-x-twitter { --fa: "\e61b" } behind ::before { content: var(--fa) }). The characters the browser reports having drawn with each family now count in the unicode-range tests, so the icons are no longer rendered with the fallback font.
- The displayed srcset candidate keeps its descriptor when the alternative images are removed. A 240w candidate under sizes="200px" or a 2x candidate was written as a bare src, so a layout reading the intrinsic width of the image drew it larger than on the original page.
- JPEG XL images are named .jxl in self-extracting ZIP archives even when their URL carries no extension, and are extracted as image/jxl instead of application/octet-stream.