2

The setting System > Configuration > Web > Session Cookie Management> Cookie Restriction Mode

comes with the following warning on Enterprise:

Note that to fully restrict cookies, full page caching must be disabled as well.

Questions:

  • Turning FPC off is quite a penalty for this feature - were they just too lazy to implement placeholders or are there any other valid reasons for this?

  • I have found notices.phtml and ga.phtml that rely on the cookie acceptance - any others?

  • I have no idea, what this is or what it restricts, but from my point you are correct with notices.phtml and ga.phtml – Fabian Blechschmidt Feb 14 '14 at 7:50
  • When enabled it displays the following "This website requires cookies to provide all of its features. For more information on what data is contained in the cookies, please see our ...." and a button to Allow cookies. (if it was working correctly you should only get a cookie after clicking Allow). – Kristof at Fooman Feb 14 '14 at 10:19
2

If i remember correctly the problem is FPC uses cookies that hold tracking information like name or cart contents. If you disable them, FPC does not work.

3

The problem is that, if you allow it, a cookie is saved and the shop is allowed to use Google Analytics (ga.phtml) etc. Unfortunately the FPC might cache blocks which use cookies so it can't be evaluated if you allowed the cookie or not. Therefore the first hit on a page decides if everyone allows cookies or noone allows cookies.

To solve this issue you probably need to punchhole at least notices.phtml and ga.phtml, probably more, to load them dynamically "thru" the FPC if cookies are allowed.

I guess Magento just can't handle it out of the box, so you probably need some more extensions.

One idea is to add both blocks always, but as a string in JavaScript (so it's not actually executed). Then use JavaScript to read the user_allowed_save_cookie cookie and parse the contained JSON data and decide if the blocks should be added to the homepage. You can find more information about this cookie in the Mage_Core_Helper_Cookie class.

  • Thanks for your reply - I guess it confirms my suspicions that this is an omission by Magento and adding this warning was the easy way out. – Kristof at Fooman Feb 17 '14 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.