Skip to content
crocodillon.

From the field notes

JavaScript.

JavaScript language details, browser behavior, and useful workarounds.

7 articles

JavaScript articles

  1. Validating related fields with Zod

    Validate dependent fields with Zod refinements, put useful errors next to the right input, and handle the antimeridian when checking geographical bounds.

    4 min read
  2. Your own SSO provider using Better Auth

    Build an OpenID Connect provider with Better Auth, use encrypted stateless client sessions across domains, and revalidate identity and permissions before writes.

  3. Reading query string values in JavaScript

    To get anything useful from window.location.search you need to parse it in JavaScript to get individual values.

    2 min read
  4. Non-blocking web fonts using LocalStorage

    You want custom web fonts, but without the performance drawback? Read how to use a simple script to load base64 encoded web fonts in a non-blocking way and cache them in LocalStorage.

  5. Always catch LocalStorage security and quota exceeded errors

    Why you should always catch LocalStorage errors, and a cross-browser solution to catch the quota exceeded error.

    4 min read
  6. Parsing emoji Unicode in JavaScript

    JavaScript is limited in supporting emoji Unicode. This post describes the problem and a workaround.

    7 min read
  7. In JavaScript, almost anything is an expression

    Article about JavaScript expressions, operators and operator precedence.

    5 min read