cookies.js

Frontend website projects: 1. Anchor, 2. Deferment, 3. Displays

cookies.js

by George Frias
Created: 2021-01-14 | Updated: 2021-03-08

info.png A frontend programming file for using website cookies.
  1. Introduction
  2. Cookies - All the data types that collectively can be referred to as cookies.
  3. Usage

Introduction

/script/library/cookies/cookies.js
/script/library/cookies/cookies.min.js

This file is the same no matter where it goes. Do not modify this file.

cookies.js
cookies.js Manifest link-internet.png
1.0.0 (Latest release) link-internet.png
Introduction to cookies.js file-pdf.png

Cookies

This file was made to handle using client side data with websites, something referred to collectively as cookies. Right now the only technology being used in cookie.js is for the classic cookie, but I will be adding all forms of client side data into this class.

Information about all cookies
1 HTTP cookie - Wikipedia link-internet.png
2 Web storage - Wikipedia link-internet.png
3 Indexed Database API - Wikipedia link-internet.png

Usage

Deferment project includes the examples for using cookies.

var G_USE_COOKIES = false; Cookie.SetUseCookies ( false );
There is a safety switch that can be implemented if needed by setting "var G_USE_COOKIES = false;" before cookie.js is inserted. This situation can happen when cookie consent did not occur, and the switch relies that the on off settings are not overridden.