Reputation: 587
Is there a simple way to make sure no cookies are set by CodeIgniter (ci_session) unless agreed to by the visitor?
"In the UK a new Cookie Regulation officially announced on 20th May 2011 and will be enforced from May 2012 that website owners must gain a visitor’s consent that they will be tracked by cookies on that website."
Many thanks!
Upvotes: 3
Views: 1702
Reputation: 60048
Ironically, to track if a user wanted to use a cookie, you would almost need a cookie to know that :)
But thinking aloud - the solution would be to not create any cookies on the main page. Then in your view have a link: "click here if you accept cookies"
which directs to /yourcontroller/turnoncookies function
then in your function, load the session class, and create the cookie.
Upvotes: 1