Skip to content

GFP cookie expiration uses seconds instead of milliseconds #40463

@glevitzky

Description

@glevitzky

Description

GFP cookie expiration times are set based on a value derived from an http response header from ad responses. The http header sets the expiration in seconds, but client code in AMP expects milliseconds. This results in expiration dates in the past, and hence no cookies are being set.

Reproduction Steps

View any AMP page with an A4A ad. See the amp-ff-set-cookies header value and note the "expires" value. Observe that if this value is passed to new Date(expires).toUTCString() the date will be in 1970. Observe further that no cookie set in the browser. Multiplying this value by 1000 (converting to ms) makes the date correct.

Relevant Logs

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions