Recently I needed to crop user-uploaded avatars for a project, with support for drag-to-adjust crop areas. I looked at a few existing libraries—eit…
Posts for: #JavaScript
Browser-Side Image Format Conversion: Canvas toBlob Quality Parameter and Color Space Pitfalls
I recently built an image format converter and discovered that browser-side image conversion, while seemingly simple, has many technical details wo…
Browser-Side Image Compression: The Right Way to Use Canvas API
Last week during a project optimization, I discovered user avatars were often 5-10MB each. Uploading these directly to the server was wasting bandw…
Image to Base64 Conversion: A Deep Dive into FileReader API and Data URL Implementation
I recently worked on an image upload feature that needed preview and Base64 conversion. Thought it was just calling an API, but ended up hitting se…
Building an Icon Library Tool: From Lucide React to Search Filtering
Managing icons in frontend projects is always a hassle. Designers send a bunch of SVGs, developers manually import, name, and wrap them. Recently d…
The Complete Guide to HTTP Status Codes: From Protocol to Troubleshooting
When debugging APIs, you’ve surely encountered various HTTP status codes. 200 OK is straightforward, but what about 401, 403, or 500? What’s the di…
HTTP Response Headers Analysis: A Complete Guide to Security Scoring and Performance Optimization
Recently, while debugging a production issue, I noticed our API responses were painfully slow. Opening DevTools revealed the culprit: `Cache-Contro…
HTML Formatter Implementation: From String Parsing to Indentation Reconstruction
Tool link: https://jsokit.com/tools/html-format
HTML Entity Encoding: From XSS Prevention to Character Escaping Implementation
Building a content management system recently, I needed to safely display user-submitted text on pages. Direct rendering? XSS attacks await. Escape…
From MD5 to SHA-512: Hash Algorithm Principles and Browser Implementation
While building a file verification tool recently, I revisited hash algorithms. Many developers know terms like MD5 and SHA, but few understand the …