svelte-cookie-banner
    Preparing search index...

    Type Alias CookieConfig

    Configuration options for setting a cookie.

    type CookieConfig = {
        domain?: string;
        expiration?: number | Date;
        name: string;
        path: string;
        sameSite?: "strict" | "lax" | "none";
        secure?: boolean;
    }
    Index

    Properties

    domain?: string

    The domain attribute of the cookie.

    expiration?: number | Date

    The expiration date of the cookie. Can be specified as a number (in days) or a specific Date.

    name: string

    The name of the cookie.

    path: string

    The path attribute of the cookie.

    sameSite?: "strict" | "lax" | "none"

    The SameSite attribute to control cross-site request behavior.

    secure?: boolean

    If true, the cookie will only be transmitted over secure protocols (HTTPS).