Disabling the use of cookies on my website

I am working on a new PHP application that will allow users to register for an account to use my service. I want the website to comply with new legislation in the UK to provide website visitors with the option to enable or disable the use of cookies on their first visit.

I'm not quite sure, but what is the best way to implement this. If I can’t save the cookie, how will I track whether the user will visit the site for the first time to display this message, or if this is not the first visit, then do not display the cookie.

Thanks for any help you can provide.

+4
source share
2 answers

The law mainly deals with third-party cookies. Your first cookie, and it’s usually considered that everything is in order. You should be okay with a notification on your site stating that you use cookies, and if people don’t like it, they should get off your site (perhaps more politely)

From personal recommendations :

Third-party cookies are unlikely to pose a privacy risk if websites provide clear cookie information to users and protect privacy, for example, a user-friendly mechanism to refuse to collect data and ensure that identifiable information is anonymous.

Also note that this is not a law at all - it is an EU directive and it is not really enforced.

+3
source

You should distinguish between session cookies and other cookies:

Session cookies will be deleted as soon as the user closes the browser, they are important to ensure secure session processing and increase user privacy. It would be absurd to ban these cookies.

Persistent cookies , especially third-party cookies , can be stored in the user's browser for a long time. They are often misused to collect information about the user, so the user should be asked if they allow such cookies. Unfortunately, only honest sites will never care about this law / recommendation.

EDIT:

I found a description of exceptions in ICO cookie guides that seem to end up with clean session cookies:

There is an exception to the requirement to provide cookie information and consent, where is the use of the cookie:

(a) for the sole purpose of communicating electronically; or

(b) when such storage or access is strictly necessary for the provision of information society services requested by the subscriber or user.

... This exception is probably applicable, for example, to the cookie used to make sure that when a site user selects the products they want to buy and click "add to cart" or "go to the" Checkout "button, site" remembers what they chose on the previous page. This cookie is strictly necessary to provide the service that the user requests (by accepting the purchase that they want to make at the checkout), and therefore an exception will be applied and consent will not be required.

EDIT2:

If you ask the user to store non-seasonal cookies, and he does not allow them to be stored, save this information in your session, but ask him again when he returns with another session. It is his choice to receive this message whenever the browser has been closed.

+2
source

Source: https://habr.com/ru/post/1490127/


All Articles