amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

GFP cookie expiration uses seconds instead of milliseconds

Open glevitzky opened this issue 10 months ago • 1 comments

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

glevitzky avatar Jan 07 '26 21:01 glevitzky

hi could you assign this issue to me?

kedarvartak avatar Jan 08 '26 08:01 kedarvartak