You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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])>. LocalStorage owns the key and exposes it through oisKey().
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.
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
changed the title
ois: store and replay the fingerprint OIS id from the X-Optable-OID header
Add OIS support
Aug 26, 2026
We should probably consider adding the ois demo to demos/index.html. Its already added in the Dockerfile, but every other pages is in the index.html except OIS
We should probably consider adding the ois demo to demos/index.html. Its already added in the Dockerfile, but every other pages is in the index.html except OIS
One thing to verify before merge: X-Optable-OID is a non-safelisted header, so it triggers a CORS preflight (OPTIONS) on every /identify, /profile, and /uid2/token call. This is the first custom request header the SDK sends on production traffic (X-Forwarded-For is test-only via mockedIP), so the node likely hasn't needed preflight support before.
Can you confirm the OIS node returns Access-Control-Allow-Headers: X-Optable-OID (preflight) and Access-Control-Expose-Headers: X-Optable-OID (response)? If not, these three calls fail once ois: true is set. It's opt-in, so blast radius is limited — but worth checking against a real node.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The DCN recognizes a browser by the
OPTABLE_OIDcookie, 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
sigparam, and returns it onX-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 theX-Optable-OIDresponse header and replays it on subsequent requests. Limited to the endpoints where the DCN derives onelib/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 underOPTABLE_OIS_<base64(host[/node])>.LocalStorageowns the key and exposes it throughoisKey()./vanilla/ois.htmland/vanilla/nocookies/ois.html.How to Test
A demo page is available at
/vanilla/ois.htmland/vanilla/nocookies/ois.html, showing the ID returned, its storage key, the decodedsigsignals, and theX-Optable-OIDheader 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.
Notes