The Curious Engineer

All blogs / JavaScript / TypeScript

Alex MacArthur's Blog

macarthur.me

I'm a software engineer in Nashville, bossing around computers in made-up languages.

JavaScript / TypeScriptFrontend / CSS / browsersWeb development

Posts
75 from 8 Sep 2022 to 30 Mar 2026
Posting
now and then (3 in the last year)
Kind
personal blog
Feed
https://macarthur.me/rss/feed.xml

2026 2

  1. Your options for preloading images with JavaScript
  2. I used a generator to build a replenishable queue.

2025 9

  1. DNS Resolution Adds Up
  2. `document.currentScript` is more useful than I thought.
  3. I think the ergonomics of generators is growing on me.
  4. I guess some request headers are more trustworthy than others.
  5. There are a lot of ways to break up long tasks in JavaScript.
  6. We'll soon be able to slide open a `height: auto` box with native CSS.
  7. I didn't know you could compose template literal types in TypeScript.
  8. Short-Lived, Tick-Bound Memoization in JavaScript
  9. Using Forced Reflows and the Event Loop to Slide Open a Box

2024 27

  1. You Might As Well Use a Content Security Policy
  2. Avoiding a "Host Permission" Review Delay When Publishing a Chrome Extension
  3. Collect All Requested Images on a Website Using Puppeteer
  4. TIL: inline event handlers still fire when passed to React's dangerouslySetInnerHTML
  5. Streaming Text Like an LLM with TypeIt (and React)
  6. I didn't know you could use sibling parameters as default values in functions.
  7. Empty Building
  8. JamComments Now Offers AI-Powered Moderation
  9. It Might Be Worth Converting that GIF to an Animated WebP
  10. Exploring the Possibilities of Native JavaScript Decorators
  11. How to Back Up Self-Hosted Plausible Analytics Data to an R2 or S3 Bucket
  12. On Building Structured Data with Client-Side JavaScript
  13. Control JavaScript Promises from Anywhere Using Promise.withResolvers()
  14. Re-Enabling Emails for Ghost CMS Members
  15. Adding Structured Data in Astro's Starlight Documentation Framework
  16. It’s Probably Only Getting More Important to Use (Good) Structured Data
  17. Helpful Guidelines for Posting on LinkedIn
  18. Looking Forward to (Hopefully) Not Needing Responsive Images One Day
  19. You Might Consider Using an Image Sitemap
  20. The Architecture Might Not Be the Problem
  21. Transform Image URLs with a Simple Cloudflare Worker
  22. Hold a Healthy Sense of Caution Whenever Running a curl|bash Command
  23. It's Never Been Easier to Performantly Put Images on the Web
  24. Why Am I Getting a 502 Bad Gateway After Turning on Plausible?
  25. How to Back Up Your Self-Hosted Plausible Analytics Data
  26. Picking the Right Tool for Maneuvering JavaScript's Event Loop
  27. Raise the API Rate Limit for a Self-Hosted Instance of Plausible

2023 32

  1. Let's Bring Back JavaScript's `with()` Statement
  2. Executing Dangerously Injected Scripts Inside React Components
  3. "Server-rendering your UI is expensive!"
  4. You should still look at your site with JavaScript disabled.
  5. Strive for Being "Feature-Complete"
  6. There Are a Lot of Ways to Hide Stuff in the Browser
  7. Lighthouse is Not Your User
  8. Deserializing Polymorphic Lists with Kotlin, Jackson, and Spring Boot
  9. For Maximum Accessibility, Be Careful About Using a .dev Domain
  10. Don't Let Visitors Know Your Origin Server Exists
  11. PicPerf's Impact on Jane Ross Tutoring's Website
  12. TIL: A Link’s Download Attribute Won’t “Just Work” for Cross-Origin Resources
  13. Get All That Network Activity Under Control with Priority Hints
  14. Your Cache Headers Could Probably be More Aggressive
  15. Reviewing PicPerf's Impact on SongwriterCity.com
  16. Building a Two-Way Data Binding Hook for Form Inputs in React
  17. Taking Variable Fonts for a Spin
  18. Run Puppeteer with Docker on Fly.io
  19. How to Better Leverage Browser Preloading
  20. Mount a Multi-Page SPA into an App with Server-Side Routing
  21. Why I Moved from Notion to Ghost for My Headless CMS
  22. Why Your Website Should Use Modern Image Formats
  23. Why I Like Using Maps (and WeakMaps) for Handling DOM Nodes
  24. Elegant Memoization with Ruby’s .tap Method
  25. If Possible, Don't Run Prism.js in the Browser
  26. Consider Animating Your Canvas in a Web Worker
  27. More Elegant Destructuring with JavaScript Generators
  28. Use a MutationObserver to Handle DOM Nodes that Don’t Exist Yet
  29. You’ve Got Options for Removing Event Listeners
  30. Use the .matches() Method to Determine if a Selector Matches an Element
  31. What I Like About Astro
  32. How to Lazy Load Disqus for Improved Site Performance

2022 5

  1. Keep Using Disqus if You Don’t Care About SEO, Performance, and User Privacy
  2. When I Actually Needed useLayoutEffect() in React
  3. Serving Notion Presigned Images with Cloudflare Workers
  4. I’ve Boarded the SSG Train Again
  5. Why Can’t You .forEach() Over Empty Array Items?