Techreport blog

Engineering Insights & Guides

The best problem-solving writing in software engineering — databases, performance, security, frontend and distributed systems, in one feed.

13,309 articles
Frontend — Same-origin policy

Same-origin policy

A browser can load and display resources from multiple sites. If there is no restriction on interactions between those resources, and if a script is compromised by an attacker, the script could expose everything on a user's browser.

Wweb.dev·Frontend
Engineering — SameSite cookie recipes

SameSite cookie recipes

Sites can now explicitly mark their cookies for cross-site usage. Learn how to mark up your cookies to ensure that your first-party and third-party cookies continue to work after this change is implemented.

Wweb.dev·Engineering
Security — SameSite cookies explained

SameSite cookies explained

Learn to mark your cookies for first-party and third-party usage with the SameSite attribute. You can enhance your site's security by using SameSite's Lax and Strict values to improve protection against CSRF attacks. Specifying the new None attribute lets you explicitly mark your cookies for cross-site usage.

Wweb.dev·Security
Networking — Schemeful Same-Site

Schemeful Same-Site

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.

Wweb.dev·Networking
Frontend — Script evaluation and long tasks

Script evaluation and long tasks

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.

Wweb.dev·Frontend
Security — What are security attacks?

What are security attacks?

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.

Wweb.dev·Security
Security — Security headers quick reference

Security headers quick reference

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.

Wweb.dev·Security
Security — Security should not be so scary!

Security should not be so scary!

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".

Wweb.dev·Security
Performance — Use WebP images

Use WebP images

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.

Wweb.dev·Performance
Engineering — Serve responsive images

Serve responsive images

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.

Wweb.dev·Engineering