GDPR Compliant Cookie Usage - Test Your Website for Free

Posted by shibhi on December 9th, 2020

What is a Cookie?

A cookie is a small plain-text file stored on your computer which is sent to and from the web server each time you request a web page.

It can contain anything that can be stored as text, such as a session id, or items in a shopping basket.

A cookie can only be accessed by the website that gave you the cookie. If www.privado.ai  gave you a cookie, then www.facebook.com could not read the contents of the cookie; this feature of cookies adds to their safety and increases the privacy of anything held inside the cookie.

An example of the contents of a cookie file

cookie file: www.amazon.co.uk_session-idDQAAALwAAAAZe_mIMLseBu03_2VTL4hPP5ch5uCo6wnguJ5Hfj6ibVeb4bIucJ_21Qzx44VRhRqz1VbKX8i

The data in this file is a session id, and simply gives amazon a unique ID to your visit on their website, enabling them to keep the state of your activity on their site from page to page, it is likely that this would be used to identify your shopping basket as you add products to it on the website.

Types of Cookie

Cookies can be defined by how long they exist, or who served them, as well as some other factors such as encryption.

How long they exist for

Session Cookies

A session cookie can be created by a website at any time but has no expiration time specified, this forces the cookie to expire with the user closes their web browser.

As soon as you close your browser, a session cookie will be removed from your cookie folder and will not be recoverable, these are useful for keeping track of something while you are still on a website but do not allow the website to remember you once you leave.

The majority of websites use session cookies.

Persistent Cookies

A persistent cookie (often known as tracking cookies) can be created by a website at any time, but an expiration time is specified by the website.

A persistent cookie is only removed once the expiration date has passed; which can be years.

This type of gdpr cookie consent allows the website to remember things about you over a longer-term. You will probably have seen this when returning to websites such as Amazon or eBay, where they still know your first name even though you are not logged in yet. This information was stored in a cookie before you left the website last time, and is now available when you return.

Who Created Them

First Party Cookies

First-party cookies are created by the website that you are visiting, for example, if you visit www.facebook.com, you will receive first-party cookies that come from Facebook.

Third-Party Cookies

Third-party cookies are created when the website you are visiting includes items from other sources, such as advertisers. An external advert placed on a website has the ability to give you cookies through your visit.

Other Factors

Secure Cookies

If you are communicating with a website over an HTTPS connection, any cookies that are sent to and from your browser will be encrypted.

How Do They Work?

Cookies are one of the simplest components of the HTTP protocol. We have described how cookies work in the image and text below. This example assumes that a session id cookie is being used.

  1. You visit a website for the first time since you opened your web browser by typing the address into the address bar.
  2. Your browser creates a request and sends it to the webserver.
  3. The web server receives your request and processes it.
  4. The web server sees that you currently do not have a session cookie, creates a unique session id for you, and places it into a cookie.
  5. The web server then sends you the cookie along with the web page you have requested.
  6. Your web browser saves the cookie to its cookie folder and displays the web page.
  7. You click a link on the web page to add an item to your basket.
  8. Your browser creates a request which includes all the cookies you currently have and sends it to the webserver.
  9. The webserver receives your request and processes it.
  10. The web server sees that you already have a session id cookie, and uses this session-id to store which product you clicked on and remember that you clicked it.
  11. The web server then sends you the cookie back with any modifications along with the next web page.
  12. Your web browsers save the cookie to its cookie folder and display the web page.

What are they used for?

Over 92% of websites use cookies:

  • They help search engines remember that you want your search results in English (or any other language);
  • They help personalize your online session;
  • They help online stores remember the items you've put in your shopping cart;
  • On weather sites they remember which cities you want the forecast for;
  • Advertisers can also use cookies to deliver ads that are more relevant to you.

Similar Technologies

Web Beacons

Also called a Web bug or a pixel tag or a clear GIF. Used in combination with cookies, a Web beacon is an often-transparent graphic image, usually no larger than 1-pixel x 1 pixel, that is placed on a Web site or in an e-mail that is used to monitor the behavior of the user visiting the Web site or sending the e-mail. When the HTML code for the Web beacon points to a site to retrieve the image, at the same time it can pass along information such as the IP address of the computer that retrieved the image, the time the Web beacon was viewed, and for how long, the type of browser that retrieved the image and previously set cookie values.

Web beacons are typically used by a third party to monitor the activity of a site. A Web beacon can be detected by viewing the source code of a Web page and looking for any IMG tags that load from a different server than the rest of the site. Turning off the browser's cookies will prevent Web beacons from tracking the user's activity. The Web beacon will still account for an anonymous visit, but the user's unique information will not be recorded.

HTML5 Web Storage

With HTML5, web pages can store data locally within the user's browser.

Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance.

Wordpress Cookie Consent

you can use wordpress cookie consent for wordpress cms website

The data is stored in key/value pairs, and a web page can only access data stored by itself.

Local Shared Object (Flash Cookie)

Local shared objects contain data stored by individual websites. With the default settings, the Flash Player does not seek the user's permission to store local shared objects on the hard disk. By default, an SWF application running in Flash Player from version 9 to 11 (as of Sept 1, 2011) may store up to 100 kB of data on the user's the hard drive. If the application attempts to store more data than the allotted default, the user is shown a dialog to allow or deny the request for more storage space.

Like it? Share it!


shibhi

About the Author

shibhi
Joined: December 9th, 2020
Articles Posted: 2

More by this author