patcg-individual-drafts / topics

The Topics API
https://patcg-individual-drafts.github.io/topics/
Other
589 stars 168 forks source link

Redirects and Topics calculation #311

Closed chrisn closed 2 months ago

chrisn commented 2 months ago

If I have a hostname news.bbc.co.uk that is a 301 permanent redirect to bbc.co.uk/news, would the news.bbc.co.uk hostname be used in Topics calculation if the user browses to it? Reading the spec, I see that Topics calculation input data needs a Document, which AIUI the browser's initial request to news.bbc.co.uk wouldn't have, so wouldn't be included. Have I understood correctly?

(This question was prompted by reading the latest CMA report which uses news.bbc.co.uk as an example of Topics calculation.)

jkarlin commented 2 months ago

You're correct. The hostname used on the page for Topics calculation is the one associated with the loaded document, which is the hostname at the end of the redirect chain. In this case, bbc.co.uk is what would be used for Topics calls on the page.

chrisn commented 2 months ago

Thank you for confirming, I appreciate your help!