mds1256 Posted May 30, 2012 Share Posted May 30, 2012 With the new EU law what is the done way to disable cookies dynamically. Give the user the option to opt out but how does this work behind the scenes?? Is it Javascript or PHP, and how is it implemented? Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/ Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 When the user first visits your site, take them to a splash page that asks if they want to use cookies. If they say yes, proceed to your page. If they say no: 1) If your page cannot be used without sessions and cookies (like most pages), show them a "we're sorry, this site requires cookies" page and be done with it. 2) Otherwise, set a "no cookies" cookie (I believe, under EU law, you're allowed to use a cookie to track this no cookies setting). Then find every setcookie call, and wrap it in a check to see if the nocookie cookie is set. Make sure #2 is legal. If not...hmmm...no idea. Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/#findComment-1349777 Share on other sites More sharing options...
trq Posted May 30, 2012 Share Posted May 30, 2012 I believe session cookies are legal too and can be used wether the user permits or not. I would however look further into that as well. Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/#findComment-1349783 Share on other sites More sharing options...
The Little Guy Posted May 30, 2012 Share Posted May 30, 2012 3) Get hosting outside the UK Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/#findComment-1349789 Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 3) Get hosting outside the UK This applies to businesses which exist in the UK regardless of where they're hosted. Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/#findComment-1349794 Share on other sites More sharing options...
mds1256 Posted May 30, 2012 Author Share Posted May 30, 2012 Thanks very much for the comments, very helpful Quote Link to comment https://forums.phpfreaks.com/topic/263378-dynamically-disable-cookies/#findComment-1349801 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.