Skip to content

Conversation

@juabara
Copy link
Contributor

@juabara juabara commented Dec 18, 2025

What does this change?

Implements client-side iPad detection to set a device_class cookie for proper backend targeting. Detects both older iPads (iOS 12 and earlier via navigator.platform) and newer iPads (iPadOS 13+ which report as MacIntel but have touch support). The cookie is set early in the client startup process before SDC requests are made.

@github-actions
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Comment on lines +8 to +9
// Set device class cookie for iPadOS detection (runs immediately, before any SDC requests)
setDeviceClassCookie();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the best place to call this function.

@juabara juabara added maintenance Departmental tracking: maintenance work, not a fix or a feature Do not merge ⚠️ labels Dec 19, 2025
@SiAdcock
Copy link
Contributor

Hi @juabara.

I haven't looked at the code change too closely, but it would be useful to know why we need to detect that the user is browsing on an iPad.

Also, if we're dropping a new cookie, it would also be reassuring to know that @guardian/identity are aware and that it has been cleared from a data privacy perspective.

Could you add a bit more info to the PR? Alternatively I'll be happy to chat if it's easier. Thanks so much!

@theemilyturner
Copy link

Hi @juabara.

I haven't looked at the code change too closely, but it would be useful to know why we need to detect that the user is browsing on an iPad.

Also, if we're dropping a new cookie, it would also be reassuring to know that @guardian/identity are aware and that it has been cleared from a data privacy perspective.

Could you add a bit more info to the PR? Alternatively I'll be happy to chat if it's easier. Thanks so much!

Hi @juabara , on this, as Simon has mentioned, any new cookies need to be documented and confirmed as essential by the Data Privacy team, please fill out this form and let me know when you have done so to kick off the process. Thank you.
https://docs.google.com/forms/d/1kk9ya8OWnMzexJcrY0W4uk9WLQGUHGnbk-85osrqch0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do not merge ⚠️ maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants