How to check cookies on your website

Blog
Learn how to check cookies on your website in minutes. This step-by-step guide covers everything from viewing cookies in popular browsers to troubleshooting and best practices for optimal performance and compliance. Let’s dive in.
Table of Contents
Reviewing the cookies used on your website is a crucial step to ensure compliance with regulations like ePrivacy and GDPR.

To comply with legal requirements, it’s essential to identify which cookies are being used, categorize them (e.g., necessary, functional, marketing, etc.), and determine which ones require user consent. 

For instance, tracking and third-party marketing cookies typically require explicit user consent under GDPR.

Additionally, it’s important – both for your marketing and compliance – to review the cookies you use, to ensure that they function correctly.

This guide shows you how to easily check, manage, and troubleshoot cookies on your website.

Why check what cookies your website is using?

There are multiple reasons why you’d want to identify the cookies running on your website.

Checking cookies can help you:

  • Identify or confirm what cookies you use to ensure that you don’t place any cookies that you aren’t aware of.
  • Ensure proper cookie categorization for privacy compliance.
  • Delete or block unnecessary cookies to boost site performance and privacy.
  • Troubleshoot website issues as corrupt cookies can sometimes cause login or display errors on websites.
For example, some CMS platforms (such as WordPress) may add third-party cookies through plugins or extensions without clearly informing you. These cookies could include marketing trackers or analytics scripts.

Additionally, to ensure your site complies with privacy regulations, it’s vital to be aware of the types of cookies being used on your website.

Two people analyzing data

How to check your websites cookies in your browser

Every major browser allows you to view and manage cookies, making it easier to ensure compliance and troubleshoot potential issues. 

To get the most accurate view of the cookies a website is using, it’s recommended to:

  • Open a fresh tab in private browsing or incognito mode: This prevents cookies from other websites from being included in the inspection.
  • Disable any third-party cookie blockers or similar tools: These might hide some of the cookies used on your site, giving you an incomplete picture.

Below, we’ll guide you through how to check cookies in the four major browsers:

Step 1: Open Developer tools

Keyboard shortcut:

    • Windows: Ctrl + Shift + I
    • Mac: Option + Cmd + I

Alternatively;

  • Click the three dots in the top-right corner of Chrome.
  • Hover over “More tools” and select “Developer tools.”
How to open Developer tools in Chrome

Step 2: Navigate to “Application” tab

  • Click the “Application” tab at the top of the Developer tools panel.
  • Expand the “Storage” section on the left and click “Cookies.”
How to find the cookie overview under the Application tab in Developer tools

Step 3: View cookies

  • Select your website from the list to see all the cookies being set.

Step 1: Open Web Developer Tools

Keyboard shortcut:

    • Windows: Ctrl + Shift + I
    • Mac: Option + Cmd + I

Alternatively;

  • Click the hamburger menu (three horizontal lines) in the top-right corner.
How to open Web Developer tools in Firefox
  • Select “More tools” > “Web Developer Tools.”
How to open Web Developer tools in Firefox

Step 2: Navigate to “Storage” tab

  • In the “Storage” tab, expand the “Cookies” section on the left.
How to find the cookie overview in the Storage tab in Web Developer tools

Step 3: View cookies

  • Select your website to view detailed information about the cookies being set.

Step 1: Open Developer tools

Keyboard shortcut:

    • Windows: Ctrl + Shift + I
    • Mac: Option + Cmd + I

Alternatively;

  • Click the three dots in the top-right corner of Edge.
  • Hover over “More tools” and select “Developer tools.”
How to open Developer tools in Edge

Step 2: Go to the “Application” tab

  • Click the “Application” tab at the top of the Developer tools panel.
  • Expand the “Storage” section on the left and click “Cookies.”
How to find the cookie overview in the Application tab

Step 3: View cookies

  • Select your website to see a list of cookies, and inspect details.

Step 1: Enable features for developers

  • Go to “Settings” > “Advanced”.
  • Check the box next to “Show features for web developers.”
How to enable "features for web developers" in Safari

Step 2: Open “Web Inspector”

  • Keyboard shortcut: Option + Cmd + I

Alternatively;

  • Click “Develop” in the menu bar and choose “Show Web Inspector.”

Step 3: Check cookies

  • Click the “Storage” tab in the Web Inspector panel.
  • Expand “Cookies” to view all the cookies being used on your website.
How to find the cookie overview in the Web Inspector tool
Person with checklist for cookies

Best practices for setting cookies

To ensure optimal performance and security, follow these best practices when setting cookies:

Set correct paths

Limit cookie access to specific URL paths where it’s necessary. For instance, if a cookie is only required on “/user”, ensure the path is set to “/user” rather than the entire site.

Define expiration times

Set appropriate expiration times based on the cookie’s purpose:
  • Session cookies: Expire when the browser closes.
  • Persistent cookies: Set future expiration dates depending on how long the cookie needs to last.

Use Secure and HTTP-only flags

  • Secure flag: Ensure cookies are transmitted only over secure HTTPS connections, especially when dealing with sensitive data.
  • HTTP-only flag: Prevent client-side scripts from accessing cookies, which adds another layer of security.
Person with magnifying glass

How to find out where cookies are set

If you’re unsure where cookies are being set on your site, you can use the Developer tools in your browser to investigate both JavaScript and HTTP headers.

In the “Sources” tab, you can inspect all JavaScript files loaded by the page:

  • Use Ctrl + F (Windows) or Cmd + F (Mac) to search for “document.cookie.”
  • Look for code snippets that use “document.cookie” to set or modify cookies.

In the “Network tab”, you can view HTTP headers for all network requests:

  • Reload the page to capture all network activity.
  • Look for “Set-Cookie” headers in the response headers, which indicate where and how cookies are being set by the server. Note that some server-side cookies may only be visible here, as they might not appear in the “Storage” tab.
Person fixing cookies

Troubleshooting your website’s cookies

By following these troubleshooting steps, you’ll be able to identify and fix any cookie-related issues on your website, ensuring it meets performance standards and complies with privacy laws.

Step 1: Open Developer tools

  • Windows: Press Ctrl + Shift + I
  • Mac: Opt + Cmd + I

Once the Developer tools are open, navigate to the “Application” tab. Under the “Storage” section, click on “Cookies”, then select your website to review the cookies being set.

Step 2: Inspect individual cookies

Now that you have accessed the cookies, you can inspect them.

Click on the URL under the “Cookies” section to see the cookies set by your website. A table will appear, listing details of each cookie, including:
  • Name
  • Value
  • Domain
  • Path
  • Expires/Max-Age
  • Size
  • HTTP
  • Secure
  • SameSite

Review each of these details to understand and manage cookies set by your website. This process helps you get a complete view and control over the cookies, essential for both performance and compliance reasons.

Knowing which cookie attributes to inspect can help ensure proper functionality and compliance with privacy regulations.
Here are the key attributes to check:
  • Cookie Name: Ensure that each cookie is correctly identified for tracking purposes.
  • Value: Check that the data stored in the cookie matches the intended values.
  • Domain: Verify that cookies are being set for the correct domain (e.g., your website’s main domain or subdomains).
  • Path: Ensure the URL path is appropriate for the cookie’s use (e.g., limit access to certain pages like /user).
  • Expires/Max-Age: Review the expiration details to ensure cookies expire at the correct time. Session cookies should expire when the browser is closed, while persistent cookies should have a valid future expiration date.
  • Size: Monitor the size of each cookie. Smaller sizes are typically better for performance.
  • HTTP: Verify that this is set to prevent access to cookies via JavaScript, which adds a layer of security.
  • Secure: Ensure that cookies are only transmitted over HTTPS for sensitive data.
  • SameSite: Check that the SameSite attribute is correctly configured to protect against cross-site request forgery (CSRF) attacks.

If any cookie attributes are incorrect, you may need to adjust how your website sets cookies. 

This could involve:

  • Modifying server settings.
  • Editing JavaScript that manages cookies.

Regularly review cookie attributes to ensure they continue to meet both performance and compliance standards. This helps prevent issues with privacy regulations and ensures your site performs efficiently.

It’s crucial to test your website’s cookie behavior across multiple browsers to ensure consistency and prevent issues that might be browser-specific.
Browsers can handle cookies differently due to their specific policies.
For example:
  • Safari’s Intelligent Tracking Prevention (ITP) might restrict the lifespan of cookies.
  • Firefox has enhanced privacy features that could block certain cookies by default.
Regular cross-browser testing helps you ensure that your cookies work as expected for all users.

How to check your website cookies automatically

There are ways to streamline the cookie review process, for example via automated tools which can help you ensure a quicker analysis.

One such tool is Cookie Information’s Compliance Check, which scans and analyzes your website to give you an overview of the following:

  • Cookies used on your website.
  • Your cookie banner and its functionality.
  • Pre-consent and post-rejection cookie activity.
It works by typing in the domain of the website you want to scan, along with the email you want the scan results sent to.
After running the scan, review the generated reports for cookie details and compliance issues.
Using tools like our Compliance Check can streamline the process and ensure you don’t miss any hidden cookies or similar issues.
It’s really simple and completely free to use. Just click below to try it out.