Skip to content

🐛 Frequent polling todocument.cookie (once a second). #3715

@mstyura

Description

@mstyura

Describe the bug
The DataDog SDK when used in web application does periodic (once a second) poll of document.cookie. This is ineffective way to detect changes of cookie. At least on mobile Safari it is very expensive in terms of native code executed by WebKit, see #3548 for more details.
The periodic poll is initiated by:

const watchSessionTimeoutId = setInterval(watchSession, STORAGE_POLL_DELAY)

To Reproduce
Use DD SDK in a Web application.

Expected behavior
There is no polling of document.cookie for the purpose of change detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions