Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
...
This page describes how to work with cookies in a light module, especially how to read, set and remove them. The page concludes the whole tutorial by providing instructions to create a page template and bits of JavaScript code for component personalization through the visits
cookie.
...