Cookies and advertisements

Cookies and advertisements

Post by matthew1987 on Tue Jan 13, 2015 10:17 pm
([msg=86269]see Cookies and advertisements[/msg])

How can cookies be used to choose advertisements? Aren`t they subject to the same origin policy?
matthew1987
New User
New User
 
Posts: 7
Joined: Sat Jan 05, 2013 12:49 pm
Blog: View Blog (0)


Re: Cookies and advertisements

Post by centip3de on Wed Jan 14, 2015 5:30 pm
([msg=86281]see Re: Cookies and advertisements[/msg])

In the future, please don't comment on old threads that are either solved or haven't been active in multiple months. Rather, just make a new thread with your question.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Addict
Addict
 
Posts: 1479
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Cookies and advertisements

Post by WallShadow on Wed Jan 14, 2015 10:07 pm
([msg=86285]see Re: Cookies and advertisements[/msg])

Cookies can be used to track browsers and such, so whenever a user requests a specific page, they will send their cookies for that page to the website. By setting a unique cookie value and putting a very long expiration date on it, you basically 'name' the user with that cookie. Once you set that cookie once, that user will always send it to you, and you can just store and retrieve information for that specific user because you can uniquely identify him.

Same-origin policy does apply to cookies, but that doesn't break anything here. Your identifier cookie for google ads is set by a google ads site, and whenever you are loading the ads, you are requesting them from a google ads site, so same-origin policy is maintained throughout.
User avatar
WallShadow
Contributor
Contributor
 
Posts: 686
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)



Return to Web Design

Who is online

Users browsing this forum: No registered users and 0 guests