Axel Rauschmayer (also on 🦣)
dr-axel.de
Axel Rauschmayer (also on 🦣)
@dr-axel.de
• JavaScript, TypeScript, web development
• Blog: https://2ality.com

My main account is on Mastodon (you can follow via RSS): https://fosstodon.org/@rauschma
Pinned
My books on #JavaScript and #TypeScript are free to read online:

– Exploring JavaScript (ES2025 edition)
– Deep JavaScript
– Exploring TypeScript (TS 5.8 edition)
– Shell scripting with Node.js

🦋 Reposts appreciated!

exploringjs.com
Reposted by Axel Rauschmayer (also on 🦣)
Useful whenever you declare a variable just for an `if` statement. That variable should be “inside” the statement but is at the same level.

Comes up regularly in my JS code. I loved having this feature when I wrote Go code—e.g. (stmt+expr!):

if match, _ := re.FindStringMatch(str); match != nil {…}
November 10, 2025 at 9:30 PM
[Not new, but new to me] You can install Node.js versions via pnpm (think alternative to nvm).
pnpm.io/cli/env
pnpm env <cmd> | pnpm
Manages the Node.js environment.
pnpm.io
November 10, 2025 at 1:35 PM
1/ Serving HTML files: I’m surprised by the eagerness to hide the filename extension .html in URLs:

A. Many static site generators:
• Old style: /blog-post-title.html
• New style: /blog-post-title/index.html

B. Cloudflare:
• Requested URL: /blog-post-title.html
• Forwarded to: /blog-post-title
November 10, 2025 at 6:27 AM
I’ll give the Ecosia search engine a try: The quality of DDG’s results has been underwhelming.

This sounds like good news(?)
“The internet just got better: our European search index goes live”
blog.ecosia.org/launching-ou...
The internet just got better: our European search index goes live
We’ve started delivering independent search results from our European-based index. This will help us build the kind of ethical and fair internet we believe in.
blog.ecosia.org
November 9, 2025 at 7:22 PM
Cookies
November 9, 2025 at 4:28 PM
In case you’re interested—Mastodon fixed two of its weaknesses:
• Quote posts are now supported
• Everyone always sees all replies. Each server has a local view of the social network, so replies are fetched on demand and cached per server.
blog.joinmastodon.org/2025/11/mast...
Mastodon 4.5
Quote posts, the end of missing replies, new tools for admins and better emojis. All of these and more, in our latest release.
blog.joinmastodon.org
November 7, 2025 at 3:42 AM
Reposted by Axel Rauschmayer (also on 🦣)
Three website features that could be built into browsers:
• Mode toggles (dark mode, light mode, print mode, …)
• Self-links for headings
• Cookie dialogs (with a default choice that can be triggered automatically)
November 6, 2025 at 11:55 PM
Occasional JavaScript DOM wish of mine:

inputElement.addEventListener('onenterkey', (event) => {
// ...
});

Equivalent:

inputElement.addEventListener('keyup', (event) => {
if (event.key === 'Enter') {
// ...
}
});
November 6, 2025 at 11:33 PM
Reposted by Axel Rauschmayer (also on 🦣)
Mini announcement! You can now listen (and subscribe) to the podcast on YouTube/YouTube Music! It's audio-only, just displaying the episode/show art, but it's there. This was asked for by the community so we made it happen!

www.youtube.com/playlist?lis...
TypeScript.fm - The Friendly Show for TypeScript Developers
The two TypeScript Fools, Kamran Ayub and Erik Onarheim, get together weekly to bring you news, community highlights, and deep dives into the TypeScript ecos...
www.youtube.com
November 6, 2025 at 5:54 PM
CSS: I’m not sure fluid typography/layout is a good idea. I’m regularly coming across web pages that don’t look good when I open a large browser window on my 27-inch display—e.g.: YouTube looks great at half screen, not ideal at full screen.
November 6, 2025 at 4:16 PM
Reposted by Axel Rauschmayer (also on 🦣)
Game changer: Running CI/CD pipelines locally with @docker.com Compose.

Our laptops are often more powerful than CI servers. Why wait for remote runners?

🐳 Docker Compose + YAML = Local CI magic
⚡ Instant feedback
📦 Same isolation & reproducibility

k33g.hashnode.dev/drastically-...
k33g.hashnode.dev
November 5, 2025 at 2:48 PM
I’m looking into the world of authentication and most solutions are remarkably complex (most of it justified? some of it?): separate services, OR mapping frameworks, etc.

Additionally, most of the advice online sounds dogmatic and doesn’t explain the reasons for adopting certain practices.
November 5, 2025 at 5:16 PM
Hono looks interesting. It’s a server-side framework that supports a large variety of platforms: Node.js, Deno, Cloudflare Workers, Netlify, AWS Lambda, etc. Cloudflare even has Hono versions of their code examples.
hono.dev
November 4, 2025 at 8:27 PM
Reposted by Axel Rauschmayer (also on 🦣)
setHTML(), Trusted Types and the Sanitizer API. Ollie Williams shows how these APIs protect against XSS by sanitizing HTML safely and enforcing trusted types. Supported in Firefox Nightly and Chrome Canary, with wider adoption coming. #security #html

olliewilliams.xyz/blog/sanitiz...
November 3, 2025 at 1:03 PM
HTTP Basic Authentication—client-side technique for logging out a user: Send an XMLHttpRequest with wrong user/password combo.

Alas, that only works with Safari and not with Chrome and Firefox.
November 3, 2025 at 3:28 PM
Converting to and from Base64 in #JavaScript:

> Uint8Array.of(0, 1, 2).toBase64()
'AAEC'
> Uint8Array.fromBase64('AAEC')
Uint8Array.of(0, 1, 2)

Decent JS engine support: developer.mozilla.org/en-US/docs/W...
Uint8Array.prototype.toBase64() - JavaScript | MDN
The toBase64() method of Uint8Array instances returns a base64-encoded string based on the data in this Uint8Array object.
developer.mozilla.org
October 31, 2025 at 10:20 PM
Simple templating via template literals:

const tmpl = (addrs) => `

${addrs.map(
(addr) => `




`.trim()
).join('')}
${escapeHtml(addr.first)} ${escapeHtml(addr.last)}

`.trim();

exploringjs.com/js/book/ch_t...
Using template literals and tagged templates ES6 • Exploring JavaScript (ES2025 Edition)
exploringjs.com
October 31, 2025 at 4:24 PM
Reposted by Axel Rauschmayer (also on 🦣)
Today I presented to the Wasm CG a proposal for fine-grained dynamic code generation as a core WebAssembly feature. The proposal is now at phase 1!

github.com/WebAssembly/...

Also immortalized in song: suno.com/song/19e0679...
GitHub - WebAssembly/jit-interface: WebAssembly specification, reference interpreter, and test suite for the jit-interfaces proposal.
WebAssembly specification, reference interpreter, and test suite for the jit-interfaces proposal. - WebAssembly/jit-interface
github.com
October 29, 2025 at 9:49 PM
Reposted by Axel Rauschmayer (also on 🦣)
Umm... did I just create a mini Postman killer? 👀
Here's a preview of my work on adding HTTP/2 request and response body inspection for @nodejs.org in Chrome DevTools!
October 29, 2025 at 2:16 PM
JavaScript engine support for Iterator methods does look good now: developer.mozilla.org/en-US/docs/W...

My chapter on iteration explains how they work: exploringjs.com/js/book/ch_s...
Iterator - JavaScript | MDN
An Iterator object is an object that conforms to the iterator protocol by providing a next() method that returns an iterator result object. All built-in iterators inherit from the Iterator class. The ...
developer.mozilla.org
October 29, 2025 at 6:50 PM
Kind words from @cooperx86.bsky.social in the most recent JavaScript Weekly (*). Thanks Peter!

My CSS blog post: 2ality.com/2025/10/css-...

(*) javascriptweekly.com/issues/758
October 29, 2025 at 5:10 PM
Reposted by Axel Rauschmayer (also on 🦣)
🧹 Time to clean up!

unjs/ofetch ($fetch) v2 (alpha)

- 🌐 ESM-only + Native Web APIs
- 📦 Zero deps (3 → 0)
- 📉 Install: 900 KB → 28 KB
- ⚡️Bundle: 17.4 KB (6.5 KB gz) → 6.3 KB (2.4 KB gz)

More optimizations to come 🤞
October 28, 2025 at 11:43 AM
1/ Experimenting with Cloudflare for static file hosting:

• Cloudflare Pages is easy to use but forwards requests from /home.html to /home (which I don’t want because it changes existing URLs)

• Solution: Switch to Workers where forwarding can be switched off.
October 28, 2025 at 1:27 AM
Render took my sites offline, due to an increase in traffic (not humans, probably LLMs). I’d upgrade to their paid plan but I can’t set a spending limit – which find too risky. I’ll probably migrate to Cloudflare Pages.
October 26, 2025 at 6:05 PM