
Safe DOM manipulation with the Sanitizer API
The new Sanitizer API aims to build a robust processor for arbitrary strings to be safely inserted into a page.
The best problem-solving writing in software engineering — databases, performance, security, frontend and distributed systems, in one feed.

The new Sanitizer API aims to build a robust processor for arbitrary strings to be safely inserted into a page.

WasmFS and the mimalloc feature in Emscripten can help a lot with allocation and I/O performance. This guide shows how these features can lead to speed improvements of 10 times or more in some cases.

The definition of "same-site" is evolving to include the URL scheme, so links between HTTP and HTTPS versions of a site now count as cross-site requests. Upgrade to HTTPS by default to avoid issues where possible or read on for details of what SameSite attribute values are needed.

When loading scripts, it takes time for the browser to evaluate them prior to execution, which can cause long tasks. Learn how script evaluation works, and what you can do to keep it from causing long tasks during page load.

How to securely display user-controlled content on web applications.

An insecure application could expose users and systems to various types of damage. When a malicious party uses vulnerabilities or lack of security features to their advantage to cause damage, it is called an attack. We'll take a look at different types of attacks in this guide so you know what to look for when securing your application.




This article lists the most important security headers you can use to protect your website. Use it to understand web-based security features, learn how to implement them on your website, and as a reference for when you need a reminder.

When the word "security" comes to mind, it's usually in the context of bad news. But security is something to be taken as a positive and necessary part of web development just like "user experience" or "accessibility".

Assistive technologies rely on developers using semantic HTML. But what are semantics, and how do screen readers use them?

Introduction to ARIA and non-native HTML semantics

Introduction to semantics and assistive technology


WebP images are smaller than their JPEG and PNG counterparts—usually on the magnitude of a 25–35% reduction in filesize. This decreases page sizes and improves performance.

Serving desktop-sized images to mobile devices can use 2–4x more data than needed. Instead of a "one-size-fits-all" approach to images, serve different image sizes to different devices.

The pros and cons of using consistent or different expiry logic across the service worker cache and HTTP cache layers.

A deep-dive into the service worker lifecycle.

Working with service workers is new and unfamiliar for many web devs. This post provides some tips for wrapping your mind around them.

The browser's HTTP cache is your first line of defense. It's not necessarily the most powerful or flexible approach, and you have limited control over the lifetime of cached responses. But there are several rules of thumb that give you a sensible caching implementation without much work, so you should always try to follow them.

Best practices for timing your service worker registration.

A payment transaction using Web Payments starts with the discovery of your payment app. Learn how to set up a payment method and get your payment app ready for merchants and customers to make payments.
