Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Artsy Engineering 2 min read How-to mediumAdept

Hacking Around Safari's 7-day Cookie Limit

Safari's Intelligent Tracking Prevention deletes client-side cookies after 7 days, so users in GDPR/CCPA regions get the cookie consent banner again every week. Artsy works around this by having the client send its consent cookie value to a same-domain Express endpoint, which re-sets a cookie with the same name as a secure server-side cookie with a long maxAge. Safari then keeps the preference past the 7-day limit. The fix is a few lines of code, prompted by a WebKit engineer's note that same-domain secure server-set cookies are exempt from the limit, though the post admits the exact mechanism is not fully understood.

Assumes: HTTP cookiesExpress.js basics

Related posts

  • Link Click Analytics and Privacy

    WebKit mediumAdept

    WebKit keeps the anchor Ping attribute and the Beacon API enabled. Disabling them would not stop link click analytics. It would push sites toward techniques that hurt users: synchronous XHR on unload, async XHR/Fetch with 100–350 ms navigation delays, and first-party bounce tracking. Intelligent Tracking Prevention instead blocks cookies and downgrades the referrer to origin-only for all these techniques when the request goes to a classified cross-site tracker, and it cleans up bounce trackers' website data. Users who want full blocking can install Content Blockers, and the hidden User Defaults flag that disabled Ping was an internal QA mechanism that was never meant to be a user setting.

  • Private Browsing 2.0

    WebKit mediumAdept

    Safari 17.0–17.5 extends Private Browsing well beyond ephemeral storage, adding link tracking protection that strips known click-level tracking query parameters before navigation and hides URL query strings, fragments and cross-site referrers from third-party scripts. Other additions include blocking network loads to trackers flagged by both DuckDuckGo and EasyPrivacy (including CNAME- and IP-cloaked ones), Oblivious DNS over HTTPS, proxying of unencrypted HTTP, per-tab iCloud Private Relay sessions, and extensions with site access off by default. For fingerprinting, the approach is to make fingerprints unique per website and regenerate them on every fresh start, using multi-hop proxies, fewer fingerprintable APIs and small noise injection. Partitioned SessionStorage and blob URLs ship in all modes, Web AdAttributionKit keeps tab-scoped attribution working, and users can reload a site with reduced protections if it breaks.

  • Testing cookie behavior across hundreds of web surfaces with our in-house auditor

    Dropbox Tech mediumAdept

    Dropbox built an automated cookie auditor that uses Playwright to visit its 200+ web surfaces as a fresh, privacy-conscious visitor, running separate US, EU and Global Privacy Control scenarios that record cookies before interaction, decline non-essential cookies via the underlying consent controls (across 22 languages), reload, and verify the preference persists. Approved cookies and exceptions live outside the code so the Privacy team can update them without releases, and a companion URL detector deduplicates billions of traffic records into unique paths, then groups pages by consent logic to pick representative URLs. The auditor produces a weekly report separating likely violations from known false positives, and the main lesson is that defining correct behavior, maintaining the page inventory and triaging noise take more work than the browser automation itself.

  • Incident Report: March 30th, 2026 — Authenticated user data cached

    Railway easyNovice

    A CDN configuration change meant to enable Surrogate Keys for per-domain caching accidentally turned on edge caching for about 0.05% of Railway domains that had CDN disabled. For 52 minutes on March 30, 2026, GET responses, including authenticated ones, could be served to other users. Origin Cache-Control headers were honored and Set-Cookie headers were not cached, but GET responses without explicit cache headers were cached by default. Railway reverted the change, purged caches globally, added tests for caching behavior and now shards CDN rollouts over hours instead of minutes.

  • New WebKit Features in Safari 15.4

    WebKit mediumAdept

    Safari 15.4 ships over 70 WebKit additions, led by the <dialog> element with ::backdrop, lazy-loaded images, the :has() parent selector (shipped first in Safari), Cascade Layers, CSS containment, and new small/large/dynamic viewport units (svh, lvh, dvh and friends) that fix mobile viewport sizing. Other web platform additions include BroadcastChannel, Web Locks, structuredClone, Array at()/findLast(), Object.hasOwn(), and several Intl API upgrades. Web apps gain manifest-declared icons and ServiceWorker Navigation Preload. Security changes add CSP Level 3 features such as 'strict-dynamic' and remove the XSS Auditor, and many -webkit- prefixed properties now have unprefixed equivalents.

The quest for software engineering knowledge.

Look:
Layout: