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.
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.
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.
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:
How to check your website cookies in Chrome
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.”
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.”
Step 3: View cookies
- Select your website from the list to see all the cookies being set.
How to check your website cookies in Firefox
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.
- Select “More tools” > “Web Developer Tools.”
Step 2: Navigate to “Storage” tab
- In the “Storage” tab, expand the “Cookies” section on the left.
Step 3: View cookies
- Select your website to view detailed information about the cookies being set.
How to check your website cookies in Edge
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.”
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.”
Step 3: View cookies
- Select your website to see a list of cookies, and inspect details.
How to check your website cookies in Safari
Step 1: Enable features for developers
- Go to “Settings” > “Advanced”.
- Check the box next to “Show features for web developers.”
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.
Best practices for 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
- 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.
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.
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.
Identify missing or incorrect cookies
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.
- 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.
Review cookie attributes
- 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.
Adjusting and monitoring cookies
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.
Test across different browsers
- Safari’s Intelligent Tracking Prevention (ITP) might restrict the lifespan of cookies.
- Firefox has enhanced privacy features that could block certain cookies by default.
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.