Reputation: 606
I'm trying to find the best way to use cookies for saving some products (wishlist).
I want to use it to set the product_id into cookie.
What would be the best option to use? jQuery cookie plugin or PHP cookies ?
Upvotes: 2
Views: 712
Reputation: 15916
Better to set on the server with PHP if you want to go for maximum compatibility as you cannot guarantee that a given user has JavaScript enabled on their browser. However, if you mandate JavaScript use in your site I find the jQuery plugin a lot more convenient to use.
Upvotes: 5