Search
Close this search box.

What Are Cookies in WordPress Websites and Why They Matter

What are cookies in WordPress, and why do they matter? In short, an HTTP cookie is a small file sent by your website or blog to the visitor’s browser. But why do they exist?

There are different types of cookie, all of which contain bits of tracked data. These files are both useful and necessary, but some are less welcome than others.

Types of Cookie Used by WordPress

Cookies are everywhere, and it’s not only WordPress websites that use them. There are three distinct types of file which all have a specific purpose.

  1. Session cookies
  2. Persistent cookies
  3. Third-party cookies

Site owners must notify new visitors on arrival that their website uses cookies to collect data. They can then choose to accept the terms and conditions or hit the back button.

Read: How to Add a Cookies Popup in WordPress to learn more.

Most notification messages don’t specify the type of cookies used, so let’s look at those.

#1 The session cookie

Session cookies in WordPress are only temporary and therefore expire. In web talk, a session is the time taken by a visitor to complete specific tasks or interactions. The session may end when the visitor leaves the page or has been inactive for some time. Thus, session cookies track and remember user activity. That makes them especially useful for internet shopping.

Let’s assume you’ve been to an online store and bought several items. Without a session cookie, your virtual basket would be empty when you go to check out. WordPress also uses comments cookies. What they do is auto-fill the commenters details on subsequent visits to save time.

#2 The persistent cookie

Persistent cookies also go by the names first-party and permanent cookies. They collect and remember specific data as a visitor moves around and interacts with a site. Stored data can include passwords, language settings, bookmarked pages, and form details, etc. All this helps to personalise the user experience. The result is a faster, smoother website on return visits.

Your WordPress website places persistent cookies on the visitor’s hard disk drive (HDD). Some files have an expiry date. Others remain indefinitely or until the user deletes them.

#3 The third-party cookie

Third-party tracking cookies are the least popular, but they still have a purpose. Advertisers use them mostly. The idea is to exploit the collected data to target relevant ads to the tracked individual. Many websites rely on advertising revenue to help with running costs. So, if you’re going to show ads, they might as well be relevant to the visitor’s interests.

The data a third-party cookie track depends on who’s doing the tracking. Marketers and most of the social media platforms also use them. That includes the likes of Facebook, Google Ads, AdSense, and other big players. They then sell that valuable tracking data on to advertisers. Many web surfers find this type of anonymous cookie tracking intrusive and annoying.

Cookies and WordPress Plugins

Cookies are everywhere. Most people are oblivious to how many there are, what they do, or why. Even some WordPress plugins come with cookies of their own. Most of these data files are only there to help enhance the plugin’s features and functions, though.

Cookies and Virus Concerns

Some people fear anonymous cookies, thinking they might infect their device with a virus. That shouldn’t be a concern. Original cookie files can’t transfer viruses or malware because the data doesn’t change. These are not executable files, which is what malicious code needs to run. However, some bad actors do infect computers with viruses or malware disguised as cookies.

How to Block or Delete Cookies

No one has to consent to cookies. There are many good reasons to accept them, but not everyone wants to. Alternatively, you can choose to only accept cookies for selected sites.

All the major web browsers offer cookie control options like those below:

  1. Allow all cookies (usually the default setting)
  2. Allow third-party cookies
  3. Block all cookies

The screenshots below show the available options in the Google Chrome web browser:

Step 1: Click the 3-dots icon on the top right of the browser, then select Settings.

Step 2: Click the Privacy and security link followed by Cookies and other site data.

The next screen presents you with a full range of cookie control and preference options (see below). Other web browsers allow you to set similar privacy and security choices.   

Closing Thoughts

You now know what HTTP web cookies are in WordPress. You know something of their benefits and the potential privacy concerns. Most web surfers prefer to leave them for the reasons mentioned in this article. Some choose to delete the files when they close the browser. And others like to cherry-pick which cookies to allow from the web browser’s settings.

Want to Learn WordPress?

WordPress is an amazing platform for building any type of website.   It’s used by large corporations and small mom & pop sites.

You may also like

Comments

1 thought on “What Are Cookies in WordPress Websites and Why They Matter”

  1. Thanks for this article, Andy.

    Would you say adding a cookie consent popup is essential for every website?

    The article doesn’t explain any possible repercussions if your website doesn’t have one. Does it have any effect on Google rankings by not having one?

Leave a Comment

Your email address will not be published. Required fields are marked *

Create your own WordPress Theme

It's built in to WordPress using Gutenberg, and my new course shows you how.