Skip to content

BUG : useServerSideCookies: rsaRequest called on every page load with re-encrypted values, separate request per cookie #2967

@kgwood39

Description

@kgwood39
  1. With useServerSideCookies: true, /rsaRequest is POST'd on every page load even when all cookies already exist and are valid — expected behavior should be no request when cookies are current.

  2. Each cookie generates a separate POST request rather than batching all cookies into a single request using the existing cookies array — results in 4 separate requests per page load

  3. Cookie values are re-encrypted on every call producing a different ciphertext for the same underlying UUID — makes server-side change detection impossible and causes unnecessary Set-Cookie churn on every response.

Steps to reproduce the behavior:
Set these loadOptions for the rudderanalytics.load call:

var loadOptions = {
// poor performing code
useServerSideCookies: true,
dataServiceEndpoint: "/rsaRequest"
};

We expect to see on request for the all needed cookies, to have a useful cookie for it's lifetime and not re-encrypt and re-request these cookies with every page load.

This functionality is made to get around Safari ITP. 4 additional requests on every page load is too high a price to make this useful.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopen sourcePRs or issues originating from the open-source community

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions