Skip to content

Add OIS support - #324

Open
juanli16 wants to merge 6 commits into
masterfrom
ois-module
Open

Add OIS support#324
juanli16 wants to merge 6 commits into
masterfrom
ois-module

Conversation

@juanli16

@juanli16 juanli16 commented Aug 24, 2026

Copy link
Copy Markdown

Why

The DCN recognizes a browser by the OPTABLE_OID cookie, which is third-party from a publisher page and dropped by Safari/ITP, Firefox ETP and Chrome's third-party cookie restrictions. When it is blocked the DCN sees a new device on every request, and a publisher cannot configure around it.

An OIS node also derives an identity for the browser, with the help of the device signals the SDK forwards in the sig param, and returns it on X-Optable-OID. The SDK never stored that ID, so nothing carried it from one visit to the next. This gives it a client-side memory.

What Changed

  • lib/core/ois.ts (new): stores the derived OIS ID from the X-Optable-OID response header and replays it on subsequent requests. Limited to the endpoints where the DCN derives one
  • lib/core/network.ts: attaches the header on send, reads it on receive, both filtered by the same path set.
  • lib/core/storage.ts, lib/core/storage-keys.ts: cached under OPTABLE_OIS_<base64(host[/node])>. Keys derived lazily, since OIS is opt-in and the SDK builds many LocalStorage instances.
  • demos: /vanilla/ois.html and /vanilla/nocookies/ois.html.

How to Test

A demo page is available at /vanilla/ois.html and /vanilla/nocookies/ois.html, showing the ID returned, its storage key, the decoded sig signals, and the X-Optable-OID header sent and received on each call.

Unit tests cover the behaviour: storing and replaying the ID, path filtering in both directions, consent gating, the change event, and the storage key format.

  • Tested
  • Docs updated

Notes

  • Breaking change
  • Requires release

@juanli16 juanli16 changed the title ois: store and replay the OIS id when third-party cookies are blocked ois: store and replay the fingerprint OIS id from the X-Optable-OID header Aug 25, 2026
@juanli16 juanli16 changed the title ois: store and replay the fingerprint OIS id from the X-Optable-OID header Add OIS support Aug 26, 2026
@mosherBT mosherBT self-assigned this Aug 31, 2026
@mosherBT
mosherBT marked this pull request as ready for review August 31, 2026 17:32
@mosherBT
mosherBT requested review from a team as code owners August 31, 2026 17:32
@mosherBT
mosherBT removed the request for review from jimdennis-optable September 1, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants