Topic: http
-
Consistent API error responses with Problem Details
RFC 9457 defines a JSON shape for HTTP error responses (type, title, status, detail, instance) so that clients can handle errors uniformly; any consistent envelope with stable machine-readable codes achieves the same goal.
-
Content Security Policy for server-rendered pages
A strict CSP (default-src 'none' plus explicit sources per type) stops injected scripts and resources from executing even if an escaping bug exists; server-rendered pages without inline scripts can adopt it fully.
-
Designing idempotent operations and safe retries
An operation is idempotent if repeating it has the same effect as doing it once; HTTP defines which methods are idempotent, and idempotency keys extend the property to POST so clients can retry without duplicates.
-
HTTP caching with ETags and conditional requests
An ETag identifies a representation; If-None-Match lets clients revalidate cheaply with 304, If-Match protects writes against lost updates, and Cache-Control decides how long a response may be reused.
Machine-readable: JSON