Skip to content

Internet Advertisers and Third-Party Cookies – clarification?

I’ve read this question about how third party cookie are set , which is a subject I already know :

it can be done via three ways :

  • Script (application/javascript)mime type ( which is generated at server side) which can also set cookie. ( along with the script response).

  • img link <IMG href="http://www.advertiser.exmaple/add.cgi?">

  • form submission to an iframe ( for safari)

Also , this answer explain it pretty well.

Question :

I was clicking on a glasses item in

How does knows it should show me ads about glasses ? does an img / script / form submission to an iframe is being requested (with query string value for glasses) for each click on (I hardly believe so)

(even if so , it means that both and has to agree that item #447 is glasses….do they both share a db ? —huh ?)

How does it working ?


When you visit, the resources loaded from this page (images, scripts, etc.) are requested with the Referer: HTTP header. This way the advertiser knows which page you are on. Of course they can analyze the URL for keywords, or make a request and analyze the HTML, but more often they already know all they need. They know uses their ads, so they often crawl the website with the help of a sitemap.

If the Referer header is not sent (everyone can disable it in their browser), the advertiser can get the URL using JavaScript, which can send cross-origin requests in various ways, including CORS. The script can also get the right keywords instantly by analyzing current page’s HTML.

Having the keywords, the advertiser’s software will decide which ads you should see. And, by the way, they will create your profile in their database and set you a cookie with your ID, to track your preferences and behavior – and show you more personalized ads in the future.