Origin Trials allow you to test and provide feedback on new or experimental web APIs before they become a permanent part of the web platform. Chromium-based browsers—such as Chrome, Edge, and Opera—use this program to test features in production environments without committing to a permanent implementation. This post explores how Origin Trials function, their built-in safety mechanisms, and best practices for implementing them in your projects. Preventing "Burn-in" In the early days of the web, browsers used vendor prefixes such as -webkit- or -moz- to test new CSS properties. This created a "burn-in" effect: developers built millions of production sites...
The W3C Recommendation process defines the lifecycle of a web technology proposal. This process involves multiple stages of review, feedback, and implementation to ensure new features are robust, interoperable, and beneficial to the web ecosystem. This post breaks down each stage of the process, explains the implications for developers, and provides guidance on navigating the evolving landscape of web standards. Why the process matters Understanding this process helps developers decide when to adopt new web technologies. Early adoption carries the risk of building on unstable APIs that might change or be abandoned. Conversely, waiting for final recommendations might result in...
globalThis is a universal accessor for the global object in JavaScript. It provides a reliable, standard way to access global variables and functions regardless of the environment executing the code. This post explains the purpose of globalThis, how it unifies access to the global scope across different JavaScript environments, and how to use it effectively in JavaScript and TypeScript projects. It also covers polyfilling globalThis for legacy environments. Purpose and functionality Before globalThis, the global object had different names depending on the runtime environment. Code designed to run in multiple environments—such as isomorphic libraries or cross-platform utilities required complex workarounds...
As generative AI evolves, the tools used to orchestrate these models must also advance. Gemini 3 provides developers with a powerful new model, but raw API calls rarely suffice for production environments. To build robust applications, you need a framework that manages state, streaming, structured data, and external APIs. This post explores how to integrate Gemini 3 with LangChain, bridge the frontend-backend gap using LangServe, and build model-agnostic applications that work across OpenAI and Anthropic. Gemini 3 and LangChain LangChain supports Gemini 3 through the @langchain/google-genai package. Because Gemini 3 maintains compatibility with existing API infrastructure, you can often upgrade...
In the modern web development landscape, performance is a business requirement. To measure success, developers often rely on tools like Google Lighthouse or PageSpeed Insights. While these tools are valuable for catching regressions and spotting unoptimized images, they often create a "green score" placebo effect. These tools measure Lab Data—a sterile, controlled simulation—rather than Field Data, which represents the chaotic, hostile reality of your actual users. Relying solely on synthetic scores is akin to testing a car's fuel efficiency on a treadmill in a climate-controlled room and expecting the same results during a rush-hour commute in a blizzard. This post...
When you build modern web applications, you often rely on third-party services like Content Delivery Networks CDNs to host essential files. While CDNs improve performance, they also introduce a vector for supply chain attacks. Subresource Integrity SRI provides a standardized defense against these risks. This post will explain what SRI is, how it works, and why it's crucial for securing your web applications. We'll also discuss the performance implications of using SRI and how to implement it effectively, even for resources hosted on your own server. Finally, we'll provide a TypeScript script to generate SRI hashes for your assets. What...
Designing APIs is difficult; designing good APIs is even harder. While web developers often focus on the implementation details of applications, the design of the APIs they create profoundly impacts usability, maintainability, and overall success. Developers design APIs regardless of the application type. The principles of good API design apply whether building a RESTful API for a web service, a GraphQL API for a mobile app, a web component, or a simple function meant for broader codebase consumption. This post explores principles of good API design and how to implement them in projects, drawing inspiration from Lea Verou's post Bluesky...
Webpack and other bundlers often produce large JavaScript bundles that can negatively impact web application performance. While Webpack Bundle Analyzerhttps://www.npmjs.com/package/webpack-bundle-analyzer offers a visual way to analyze bundle contents and identify optimization opportunities, it is—as the name implies—Webpack-specific. Developers using other bundlers like Rollup, Vite, or Parcel require a different tool. This post covers how to set up Sondahttps://sonda.dev/, a generic bundle analyzer, and use it to analyze JavaScript bundles within Vite and Rollup projects. What is Sonda? Sonda is a generic bundle analyzer that provides a detailed breakdown of a bundle's contents, including module sizes and dependencies. It supports multiple...
Defining CSS4 is a tricky endeavor. Unlike the annual ECMAScript specifications or the monolithic releases of CSS2 and HTML5, modern CSS evolves continuously. It consists of many different modules, each with its own specification and development timeline. This post explores how we can rethink CSS4 as a concept, approach its definition, and understand its implications for web developers. Historical Context To understand why "CSS4" remains a complex topic, we must look at how the language outgrew its original structure. Before CSS, developers styled web pages using HTML attributes and tags, leading to inconsistent, fragile designs. html This text is red....
Writing modes have a significant impact on how text is displayed on a webpage. By manipulating writing modes, designers can create unique and engaging layouts that enhance the user experience. Below are some examples of different writing modes and their effects. Until recently, not all browser could use sideways text, they could only display vertical text in the upright orientation. This woulld work well for languages like Chinese, Japanese, and Korean, but not so well for Latin-based languages. Now, with better support for the text-orientation property, we can create more versatile designs in all languages. This post will explore the...