I’m attempting to store the view preference of my shop page ( list or grid ) of a logged-out user (public) in a cookie or something so when the logged-out user clicks the grid or list icon it gets saved in a cookie and upon returning it remembers their preference and loads the appropriate view.
WordPress Cookies only store cookies for logged-in users(and commenters), so how can I store this data for logged-out?
Use JQuery cookie?
Use session storage instead?
Appreciate any guidance. Thanks