performance

  • OCSP stapling saves the client a round trip

    Without stapling, a browser checking whether your certificate is revoked makes its own request to the CA — adding latency, and telling the CA which sites that user…

  • font-display: swap and the invisible text problem

    A browser waiting on a web font shows nothing where the text should be — for up to three seconds in most engines — and on a slow…

  • COPY the lock file before the source, always

    Docker caches per instruction, and the cache is invalidated by the first changed file. Copying the whole source before installing dependencies means every code change reinstalls everything. The…

  • A content security policy that does not break the site

    The header is one line. The work is finding out what it will break — which means report-only for weeks, and reading violations that are mostly not your…

  • React 16 rewrote how a component fails

    An error in one component used to blank the page. 16 unmounts the whole tree deliberately — and gives you the mechanism to stop it.

  • SCAN with a MATCH pattern is still O(n) overall

    SCAN is the safe replacement for KEYS because each call does bounded work, and the pattern is applied after the keys are fetched — so scanning a million…

  • Turning off facades in Lumen and what you get back

    Facades and Eloquent are both commented out in a fresh Lumen application, and the instinct is to switch them on immediately, which gives back most of what was…

  • Redis streams, and the broker you might not need

    5.0 shipped in October with a log-structured type and consumer groups. A list has no acknowledgement, which is why a crashed consumer loses the message.

  • Testing what the database actually does

    The repository test passed against a mock and failed against MySQL. A mock asserts what you believe the database does, which is the thing in question.

  • A .htaccess is a per-request file read, and it adds up

    Apache checks for .htaccess in every directory from the document root down to the requested file, on every request, and it cannot cache the result because the file…