Removing the Set-Cookie header so that HTML caches


Some Magento users have reported slow load times due to a MISS on the page’s core HTML. So that even though most of the other assets on the page are cached, everything gets delayed by the HTML request which is going back to origin every time. This is due to the appearance of a Set-Cookie header that Magento adds to the HTML response in order to save the contents of a shopping cart between sessions.

By default, Fastly does not cache anything that contains a Set-Cookie header. This is for security reasons, as the Set-Cookie header often contains a user specific session ID, that could get cached and then passed on to other clients, causing personal information to appear elsewhere.

For more information on how to turn this off in VCL, please refer to this blog post: