A Magento store set a session cookie on the root path. Because of that Path=/, the cookie rode along on every CSS, JS, and image request — and the CDN, seeing cookies on those responses, refused to cache them, treating them as personalized. A store with thousands of static files was running them all through origin.
We configured the edge to strip cookies from requests matching static asset paths before caching, and to drop Set-Cookie on those responses. Suddenly the static files were cacheable again.
Static-asset cache-hit ratio went from 12% to 98%. Origin requests dropped from 4.1M to 240k a day. The product page's static-asset load time in Madrid fell from 1.9s to 0.4s now that images came off the local edge.
The number that mattered: static cache-hit 12% to 98%.
Edge of Glory
@EdgeOfGloryCDN
The Magento store whose every asset carried a session
This post was published in the Telegram channel Edge of Glory (@EdgeOfGloryCDN). All its posts are on the channel page.
Open on Telegram