Skip to content

Cookie consent window keeps appearing on local use (file:// protocol) with Firefox #3202

@wilhelmer

Description

@wilhelmer

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When accessing the output locally (file:// protocol) with Firefox (v94, Windows), the cookie consent window keeps reappearing on each page.

The setting is stored for each page individually, so if you go to topic A, click Accept, and switch to topic B, you will have to click Accept again. If you then return to topic A, the consent window won't show on that page. But the setting isn't stored globally.

I suggest to never display the cookie consent window at all on local use. I don't think the GDPR stuff applies to content that is on your own hard disk. Also, GA doesn't work anyway when the content is accessed via file protocol.

Expected behaviour

The cookie consent window shouldn't reappear after switching pages, or never appear at all.

Actual behaviour

Cookie consent window keeps reappearing on each page.

Steps to reproduce

  1. Enable the cookie consent feature.
  2. Open topic A. Cookie window appears.
  3. Click "Accept".
  4. Switch to topic B. Cookie window appears again.

Package versions

  • Python: 3.9.4
  • MkDocs: mkdocs, version 1.2.3
  • Material: Version: 7.3.6+insiders.3.2.0

Configuration

site_name: My Docs
theme:
  name: material
use_directory_urls: false
extra:
    # Analytics and cookie consent
    analytics:
        provider: google
        property: UA-xxxxxx
    consent:
        title: This website uses cookies
        description: >
            We use cookies to recognize your repeated visits and preferences, as well
            as to measure the effectiveness of our documentation and whether users
            find what they're searching for. With your consent, you're helping us to
            make our documentation better.

System information

  • Operating system: Windows
  • Browser: Firefox 94

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions