Xerobit

Guides · page 8 of 14

Browsing 320 guides, newest first.

Dev Productivity

HTML Minification in Webpack, Vite, and Build Tools

Automatically minify HTML during your build process using html-webpack-plugin, Vite's built-in minification, Rollup, and Next.js. Includes configuration for removing comments,...

4 min read
Dev Productivity

HTML Whitespace: How Browsers Handle Spaces and How to Remove Them

HTML collapses multiple spaces into one and ignores most line breaks. Understanding HTML whitespace helps you minify HTML effectively and avoid unexpected display issues when...

4 min read
Dev Productivity

HTTP 404 Not Found: What It Means and How to Fix It

HTTP 404 means the server understood the request but can't find the resource. It's different from 410 Gone, 301 Moved, and 500 Server Error. Here's when each status applies and...

6 min read
Dev Productivity

HTTP 500 Internal Server Error: What It Means and How to Debug It

HTTP 500 means the server encountered an unexpected error it couldn't handle. Unlike 4xx errors, 500 is always the server's fault. Here's how to diagnose and fix HTTP 500 errors.

5 min read
Dev Productivity

HTTP Redirect Status Codes: 301, 302, 307, 308 Explained

HTTP 3xx redirect codes tell clients to look elsewhere for a resource. Here's when to use 301 vs 302 vs 307 vs 308, how redirects affect SEO, and how to implement redirects in...

4 min read
Dev Productivity

HTTP 4xx Client Error Codes: 400, 401, 403, 404, 409, 422, 429 Explained

HTTP 4xx status codes indicate client errors. Here's when to use 400 Bad Request vs 422 Unprocessable Entity, the difference between 401 and 403, what 409 Conflict means, and...

5 min read
Dev Productivity

HTTP 5xx Server Error Codes: 500, 502, 503, 504 Explained

HTTP 5xx codes indicate server-side failures. Learn when 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway Timeout occur, how to handle them...

4 min read
Dev Productivity

Image Compression Formats: JPEG, PNG, WebP, AVIF Compared

JPEG, PNG, WebP, and AVIF compress images differently. JPEG is lossy and best for photos. PNG is lossless and best for graphics. WebP and AVIF are modern formats with better...

6 min read
Frontend & Design

Image Compression Guide: Reduce File Size Without Losing Quality

Image compression reduces file size by removing redundant data. Here's how lossy vs lossless compression work, when to use JPG vs PNG vs WebP, and what settings to use.

8 min read
Frontend & Design

WebP vs JPEG vs PNG: Which Format to Use and How to Convert

WebP offers smaller file sizes than JPEG and PNG with comparable quality. Learn when to use WebP vs JPEG vs PNG vs AVIF, how to convert images, serve WebP with fallback, and...

5 min read
Frontend & Design

Image Lazy Loading: loading='lazy', IntersectionObserver, and LCP

Lazy loading defers off-screen images until they're about to enter the viewport. Learn how HTML loading='lazy' works, when to use eager loading for LCP images,...

5 min read
Frontend & Design

Reduce Image Size Online: Compress Photos Without Visible Quality Loss

Reducing image size for web involves choosing the right format, resizing to actual display dimensions, and applying appropriate compression. Here's a practical guide for every...

6 min read
Frontend & Design

Inset / Inner Shadow in CSS: box-shadow inset Examples

CSS inset box-shadow creates shadows inside an element, simulating a recessed or pressed effect. Learn how to use inset shadows for inputs, pressed buttons, and neumorphic UI,...

4 min read
Dev Productivity

IPv4 Subnetting Tutorial: How to Subnet a Network Step by Step

Subnetting divides a network into smaller subnetworks. Learn how to subnet using CIDR notation: calculate subnets, determine usable hosts, borrow host bits, and subnet a /24...

6 min read
Data & Format

JSON API Response Format: Structuring REST API Responses

A consistent JSON response format makes APIs predictable and easier to consume. Here's how to structure JSON API responses, envelope vs. flat, error format, pagination, and...

5 min read
Data & Format

JSON Deep Equal: Testing Structural Equality of JSON Objects

Deep equality checks if two JSON objects have identical structure and values, regardless of object reference. Here's how to implement deep equal for JSON in JavaScript and...

4 min read
Data & Format

JSON Diff Libraries: Best Tools for Diffing JSON in JavaScript and Python

Several libraries make JSON diffing easier than writing your own. Here's a comparison of the best JavaScript and Python JSON diff libraries, fast-json-patch, jsondiffpatch...

5 min read
Data & Format

JSON Formatting Explained: Why Pretty-Printing Matters

A JSON formatter takes compact, hard-to-read JSON and adds whitespace and indentation for readability. Here's what formatters do, why they're indispensable for API debugging,...

6 min read
Data & Format

JSON Merge Patch: Partial Updates to JSON Documents (RFC 7396)

JSON Merge Patch (RFC 7396) is a simple format for partial JSON updates. A null value removes a key; other values replace or add. Here's how JSON Merge Patch works, how it...

4 min read
Data & Format

JSON Patch (RFC 6902): Operation-Based JSON Document Updates

JSON Patch (RFC 6902) defines a sequence of operations (add, remove, replace, move, copy, test) to modify JSON documents. Here's the full operation reference with examples, and...

5 min read
Data & Format

JSON Schema Validation: Validate JSON Structure and Types

JSON Schema defines the structure and types your JSON must conform to. Here's how to write JSON Schema definitions, validate JSON in JavaScript and Python, and handle common...

6 min read
Data & Format

JSON API Versioning: Managing Breaking Changes in JSON APIs

JSON APIs need versioning when structure changes break existing clients. Here's how to version JSON APIs using URL versioning, headers, and response envelope strategies, with...

4 min read
Dev Productivity

JWT Authentication Flow: Login, Token Storage, Refresh Tokens

JWT authentication involves issuing tokens on login, sending them with requests, and refreshing before expiry. Covers the full flow in Node.js, secure storage (httpOnly cookies...

6 min read
Dev Productivity

JWT Best Practices: Secure JSON Web Token Implementation

JWT implementation mistakes lead to authentication bypasses and security vulnerabilities. Here's how to sign, validate, and store JWTs correctly, covering algorithm confusion...

6 min read