Data Layer low complexity frontend
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

localStorage-backed data layer that persists visitor cookie consent choices across page loads. Stores consent state per category alongside the policy version at the time of consent, enabling staleness detection when the cookie policy is updated.

Feature: Cookie Policy

consent-preferences-store

Responsibilities

  • Persist consent preferences to localStorage
  • Read stored consent state on page load
  • Store policy version alongside consent to detect stale consent
  • Clear stored consent on explicit revocation

Interfaces

load()
save(preferences)
clear()
getVersion()
isExpired(currentVersion)

Relationships

Dependents (1)

Components that depend on this component