Repository navigation
Highlights
- Browsers: Firefox 160, Chrome/Edge 158
- Native fetch(): Request, Response, Headers, AbortController/AbortSignal, CORS (preflight,
credentials, exposed headers), no-cors, cache modes, subresource integrity; available in workers - Cookies like the browsers: SameSite enforcement (Lax by default, cross-site frames),
secure cookies only from secure origins,__Secure-/__Host-prefixes, public suffix list
incl. private suffixes (e.g. github.io) - Content Security Policy: sandbox directive, redirect matching, data: sources,
new option to disable violation reports - iframes:
sandboxandsrcdocsupport;window.origin - Referrer policy: header, meta and
referrerpolicyattribute
(defaultstrict-origin-when-cross-origin) - Intl: NumberFormat (options, formatToParts, ranges), Collator (options, collations),
locale negotiation like the browsers
Security
- Pages not loaded from a file can no longer load or navigate to local files (
file:urls) - Redirects to non-http(s) urls are a network error
- No credentials (
user:password@) in Referer, Origin andlocation.href Set-Cookieand forbidden request headers (e.g.Origin) are no longer accessible from JavaScript- Temporary files, downloaded attachments and debug reports are readable by the owner only
⚠️ Incompatible changes
- Local file access from pages not loaded from a file is blocked (scripts, images, CSS, frames,
window.open, navigation). To get the old behavior back:
webClient.getOptions().setLocalFileAccessFromRemotePagesAllowed(true) - Redirects to local files (and other non-http(s) urls) fail
file:urls are serialized asfile:///C:/...(beforefile:/C:/...)- The protocol setters (
URL,a,area,location) follow the URL Standard;
location.protocolnavigates only to http(s) - The MIME type serialization of data urls changed (per browser)
- htmlunit-csp: the sandbox directive no longer affects the
allows*()methods
New options
setLocalFileAccessFromRemotePagesAllowed(boolean): allows local file access again
(default false)setHtmlFragmentSelfClosingTagsAllowed(boolean): reads back<h3/>markup written by
asXml()before 5.8.0 (default false)setContentSecurityPolicyReportsEnabled(boolean): disables CSP violation reports (default true)
Also
window.isSecureContextfor loopback addresses, plus many fixes for XMLHttpRequest/CORS,
HtmlRangeInput and serialization (more handlers areSerializablenow)- core-js fixes (flatMap holes, for-in shadowing, toPrecision)
Please have a look at the full release notes for details about this release.
💕 Thank you to all who have contributed and to the sponsors (more sponsoring is welcome https://github.com/sponsors/rbri).
Full Changelog: 5.8.0...5.9.0