Dealing with minified XML from third-party APIs is painful. Most online tools are either bloated or can’t handle special nodes like CDATA and comme…
Posts for: #Api
Browser-Based Web Screenshots: From getDisplayMedia API to Canvas Implementation
I recently built a web screenshot tool, thinking it’d be straightforward. Spoiler: I hit several gotchas. Here’s what I learned, in case you’re tac…
How LLM Token Counting Works: Building a Client-Side Token Estimator
Every time you call a GPT or Claude API, you’re paying by the token. But what exactly is a token, and how do you estimate token counts without load…
String Escape Implementation: From Regex Replacement to Unicode Handling
Dealing with user input strings often causes problems when special characters break JSON parsing. Newlines, quotes, backslashes - they all need pro…
From window.screen to devicePixelRatio: A Complete Guide to Browser Screen APIs
While building a responsive layout debugger, I dove deep into browser screen APIs. Beyond the common screen.width, there’s a lot more to explore….
Understanding robots.txt from Scratch: The Gatekeeper for Search Engine Crawlers
Last week, while investigating indexing issues on our website, I discovered that Google had indexed our /api/ endpoints and /admin/ login pages…
REST API Documentation Generator: From Manual Maintenance to One-Click Automation
Every backend developer knows this pain: the API changed but the docs didn’t; new team members stare at outdated documentation in confusion; during…
Random Data Generator: Mock Data Best Practices and Implementation Details
Creating test data manually is fine for a few records, but generating 100 test entries? That’s torture. During a recent project, I hit a wall: the …
Building a Placeholder Image Generator with Canvas API: From Basics to Performance
As a frontend developer, I often need placeholder images: design assets aren’t ready, images are missing, or I’m building a quick prototype. I used…
Browser-Side OCR with Tesseract.js: A WebAssembly Text Recognition Journey
I recently needed to add image-to-text functionality to a project. Instead of calling a backend OCR API, I decided to go with a pure frontend solut…