Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Disable Floc Laravel Package

spatie/laravel-disable-floc

Automatically disables Google’s FLoC in Laravel apps by adding a Permissions-Policy header. Installs via Composer and works out of the box—no configuration needed. Applies the header to responses that don’t already set Permissions-Policy.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Privacy & Compliance Roadmap: Aligns with initiatives to meet GDPR, CCPA, or other privacy regulations by proactively blocking Google’s FLoC (Federated Learning of Cohorts), a tracking technology that aggregates user data without explicit consent. This reduces legal/regulatory risk and strengthens trust with privacy-conscious users.
  • Build vs. Buy: A lightweight, open-source solution that eliminates the need to manually implement FLoC-blocking logic (e.g., custom middleware or JavaScript). Ideal for teams prioritizing speed and maintainability over custom development.
  • User Experience (UX) & Trust: Supports broader efforts to reduce tracking and improve transparency, which can be leveraged in marketing (e.g., "Privacy-First" branding) or product messaging (e.g., "No Third-Party Tracking").
  • Performance & Security: Mitigates potential performance overhead or security vulnerabilities associated with FLoC-enabled tracking scripts, aligning with performance budgets or security audits.
  • Multi-Region Deployments: Critical for global applications where FLoC adoption varies by region (e.g., EU vs. US), ensuring consistent privacy controls across markets.

When to Consider This Package

  • Adopt if:

    • Your Laravel app serves users in regions with strict privacy laws (e.g., EU under GDPR) or targets privacy-sensitive audiences (e.g., healthcare, finance).
    • You lack dedicated frontend resources to manually block FLoC via JavaScript (e.g., navigator.permissions.query({ name: 'interest-cohort' })).
    • FLoC is enabled by default in your stack (e.g., via Chrome flags or third-party scripts) and you want a server-side mitigation.
    • You’re prioritizing "privacy by default" as a competitive differentiator or compliance requirement.
  • Look elsewhere if:

    • Your app does not use Chrome/Chromium browsers (FLoC is Chrome-specific), or your user base is negligible in regions where FLoC is relevant.
    • You’re already using a broader privacy solution (e.g., a CDN with built-in FLoC blocking like Cloudflare) that handles this at the network level.
    • Your team prefers granular control over FLoC blocking (e.g., conditional logic based on user segments or geolocation), which this package doesn’t support.
    • The package’s archived status (no updates since 2022) is a concern—FLoC may evolve or be deprecated, requiring future maintenance.

How to Pitch It (Stakeholders)

For Executives: *"This package lets us automatically disable Google’s FLoC—a privacy-invasive tracking technology—in our Laravel apps with zero code changes. It’s a low-effort way to:

  • Reduce compliance risk by aligning with GDPR/CCPA without manual work.
  • Strengthen user trust by proactively blocking tracking, which we can highlight in marketing (e.g., ‘No Third-Party Tracking’).
  • Save dev time by avoiding custom implementations, freeing resources for higher-impact projects. The MIT license and Spatie’s reputation ensure reliability, though we’ll monitor for updates since the project is archived. Recommend adopting as part of our Q3 privacy roadmap."*

For Engineering: *"This is a 5-minute install that adds a DisableFlocMiddleware to your Laravel stack. Key points:

  • How it works: Injects a <meta> tag to block FLoC at the HTTP level (no JavaScript needed).
  • Limitations:
    • Only blocks FLoC for Chrome/Chromium users (irrelevant for Safari/Firefox).
    • No dynamic toggling (e.g., per user/region)—all-or-nothing.
    • Archived repo means we’ll need to monitor forks or updates if FLoC changes.
  • Alternatives considered: Custom middleware (more work) or frontend JS (slower to deploy). This strikes the best balance for our needs. Proposal: Add to app/Http/Kernel.php during our next privacy sprint. Pair with documentation for future maintainers."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport