Server side usage – PHP

Server side usage – PHP If your website is setting cookies server side, you can determine what type of cookies you are allowed to set by checking the users current consent state through standard cookie handling.   PHP if (isset($_COOKIE[“CookieConsent”])) { switch ($_COOKIE[“CookieConsent”]) { case “0”: //The user has not accepted cookies – set strictly

Server side usage – VB

Server side usage – VB If your website is setting cookies server side, you can determine what type of cookies you are allowed to set by checking the users current consent state through standard cookie handling.   VB Imports System.Web.Script.Serialization … Dim CurrentUserConsent As HttpCookie = Request.Cookies(“CookieConsent”) If CurrentUserConsent IsNot Nothing Then Select Case CurrentUserConsent.Value

Server side usage – C#

Server side usage – C# If your website is setting cookies server side, you can determine what type of cookies you are allowed to set by checking the users current consent state through standard cookie handling.   C# using System.Web.Script.Serialization; … HttpCookie CurrentUserConsent = Request.Cookies[“CookieConsent”]; if (CurrentUserConsent != null) { switch (CurrentUserConsent.Value) { case “0”:

Properties, methods, events and callback functions

The Cookie Info script loads and constructs a client side JavaScript object named ‘CookieConsent’ which exposes the following public properties, methods, events and callback functions. See the tutorial on how to deploy the Cookie Info script to your website template. Properties Name Type Default Description consent.necessary bool true True if current user has accepted necessary