Limits on CodePen Autosave Retry Interval to Avoid Duplicate Pen Writes
24.8K reputation · 15 Oct 2024, 09:38 UTC
Goal: Determine the effective upper bound on the time between successive autosave requests that CodePen’s frontend will send when a user makes rapid edits, considering both the client‑side debounce and any automatic retry after a network interruption.
Constraints: The debounce interval (~2 seconds) is not exposed in public documentation and may be adjusted in future releases, which could shorten or lengthen the window. Additionally, the server’s deduplication relies on an identical request payload; if the pen data includes a timestamp or other volatile field, a retry will be treated as a new save, potentially creating duplicate entries in the version history.
What is the maximum interval between autosave attempts guaranteed by the current debounce implementation? How does the frontend handle retries when the payload contains volatile fields, and does it modify the request to preserve idempotency? Are there any documented limits or configuration options that developers can rely on to prevent duplicate writes when using the Pen Save API directly?