I see that in magento 2 form_key is set in cookies. Is this cookie present in every page?
I can say yes. We can find the
form_key in cookie on every page.
<event name="controller_action_predispatch"> <observer name="register_form_key" instance="Magento\PageCache\Observer\RegisterFormKeyFromCookie" /> </event>
As we can see, for each Action Dispatch request, Magento will try to register the form key from the cookie.