# How was cookie installed without visit to site?

**URL:** <https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919>\
**Category:** Factual Questions\
**Created:** [May 28, 2009, 1:39pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919 "2009-05-28T13:39:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thin\_Ice](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Thin\_Ice](https://boards.straightdope.com/u/Thin_Ice)\
**Post date:** [May 28, 2009, 1:39pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/1 "2009-05-28T13:39:27Z")

</div>

Earlier today I typed field and stream into Google but I did not visit the site. Later, when I checked my cookies there was one from F&S. How did it get there? Does Google install cookies for sites now?  
I’m using Vista and Firefox 3.0.  
After I noticed this I tried a test by typing playboy magazine and got one, redbook magazine and did not get one, time magazine and got a cookie.  
I tried Googling “how cookie installed without site visit” but didn’t find anything. Does anyone know what’s going on here?

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [May 28, 2009, 1:47pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/2 "2009-05-28T13:47:11Z")

</div>

Sites can install third-party cookies unless you have your browser is set to reject them. Typically, this happens when a site you visit displays content from a third-party site, such as a banner ad. Google searches often bring up ad content related to the search criteria.

---

<div class="post-metadata">

**Author:** ![Thin\_Ice](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Thin\_Ice](https://boards.straightdope.com/u/Thin_Ice)\
**Post date:** [May 28, 2009, 3:17pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/3 "2009-05-28T15:17:54Z")

</div>

I typed the name and clicked search and the page of results came up. I immediately checked cookies and the cookie for the site I had typed in was there. I didn’t click on any links. What site put the link there?

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [May 28, 2009, 3:29pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/4 "2009-05-28T15:29:53Z")

</div>

I told you already. The primary site you visited is Google; specifically, the search results. On the search results page are ads, called Sponsored Links. Those, in turn, link back to one or more third party sites, which ultimately served the cookie.

---

<div class="post-metadata">

**Author:** ![Markxxx](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Markxxx](https://boards.straightdope.com/u/Markxxx)\
**Post date:** [May 28, 2009, 4:08pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/5 "2009-05-28T16:08:57Z")

</div>

You can set your browser to reject third party cookies. But it doesn’t always work because a site can put any cookie they want on your browser. When you do a Google search, if “Acme Spam Site,” comes up they can put a cookie on your browser, without you ever clicking into their site. Usually preventing third party cookies stops this but not always, it depends on how the site works. Google claims it prevents this, but there are tons of examples where Google fails to do this.

Cookies are just txt files so they can’t harm your computer, they can track you, but browsers have the ability to delete cookies at start up or shut down. Some browsers like, I use K-Meleon, (Which like Firefox is Mozilla based) can delete individual cookies and you can prevent sites from putting cookies on your browser.

Websites are constantly looking at new ways to get cookies on your website. Most of the time you allow this by signing into sites. The small print will say you allow this site, and affiliated sites to install cookies.

So let’s say I prevent “Spammy Acme Company” from putting a cookie but I want to go to “YouAllTube.” But “YouAllTube” requires cookies to work. So you allow “YouAllTube” to put cookies on your computer.

Now what you didn’t read was “YouAllTube” has an agreement with third parties to put their cookies on your computer under the guise of “YouAllTube.” Now “Spammy Acme Company” is one of those THIRD parties with “YouAllTube.”

So now even though you banned “Spammy Acme Company.” The company has found a way to get it’s cookies on your site by using the guise of “YouAllTube.”

That’s why I like K-Meleon cause it makes it very easy to check you cookies and ban sites quickly.

---

<div class="post-metadata">

**Author:** ![Thin\_Ice](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Thin\_Ice](https://boards.straightdope.com/u/Thin_Ice)\
**Post date:** [May 28, 2009, 4:28pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/6 "2009-05-28T16:28:47Z")

</div>

I know what cookies are and how to prevent them, I just wasn’t aware that Google lets sites install them like that. They should be ashamed of themselves. This effin internet is getting out of hand.  
Thanks.

---

<div class="post-metadata">

**Author:** ![I\_of\_the\_Tiger](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@I\_of\_the\_Tiger](https://boards.straightdope.com/u/I_of_the_Tiger)\
**Post date:** [May 28, 2009, 4:29pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/7 "2009-05-28T16:29:47Z")

</div>

The javascript in Google’s search page makes your browser invisibly make a request to the #1 search result, which preloads the content. Imagine that it’s opening the page, but in an invisible window/tab. This includes the cookie.  
When you actually click it, it loads up for you normally but is faster because most of the content is already in your browsers cache.  
They do this because most people click through to the #1 result, so it saves time overall.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [May 28, 2009, 4:51pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/8 "2009-05-28T16:51:46Z")

</div>

I don’t think so. Cookies don’t contain site content. What you say may happen (it’s called prefetching) but it has nothing to do with cookies.

---

<div class="post-metadata">

**Author:** ![Thin\_Ice](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Thin\_Ice](https://boards.straightdope.com/u/Thin_Ice)\
**Post date:** [May 28, 2009, 4:52pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/9 "2009-05-28T16:52:59Z")

</div>

This is the answer I’m looking for I. So my browser starts loading the page in a temp folder in anticipation of me clicking the top link, but Google lets the site install the cookie.  
I want a browser that rejects all cookies except those I tell it to accept. I know I can set it to reject all cookies, but then the sites I goto don’t recognize me. But if I set it to accept cookies it picks up dozens when I browse. I know I can list sites for the browser to accept or reject sites from, but there are millions I don’t want and relatively few I want. I can’t possibly name every site I want my browser to reject cookies for. I just set it to accept when I browse my sites or others on the good side of the net, and set it to reject all when I’m on the wrong side of the tracks.  
Thanks.

---

<div class="post-metadata">

**Author:** ![barbitu8](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@barbitu8](https://boards.straightdope.com/u/barbitu8)\
**Post date:** [May 28, 2009, 10:09pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/10 "2009-05-28T22:09:50Z")

</div>

Download [CCleaner.com](http://CCleaner.com) (formerly crap cleaner) and have it remove cookies. I do this every day I fire up the computer.

---

<div class="post-metadata">

**Author:** ![Arkcon](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Arkcon](https://boards.straightdope.com/u/Arkcon)\
**Post date:** [May 28, 2009, 11:40pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/11 "2009-05-28T23:40:00Z")

</div>

You want only certain cookies loaded? I do that, I use Firefox, and I’ve set it to ask every time, then decide to allow, deny, or allow for session only. Other browsers may have similar options you can set, or if not, then use a browser that does. I’d seen the Google trick you noticed a long time ago. But even back in the pre-history of the web, early-90’s, I browsed my cookie folder and saw what a diverse and eclectic variety of 3-rd party cookies I’d collected.

---

<div class="post-metadata">

**Author:** ![cardinal\_fang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cardinal_fang/32/15316_2.png) [@cardinal\_fang](https://boards.straightdope.com/u/cardinal_fang)\
**Post date:** [May 29, 2009, 10:19am UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/12 "2009-05-29T10:19:01Z")

</div>

What **I, of the Tiger** said (and **Thin Ice** confirmed). The mechanism is called link prefetching; further information (including how to disable it in Firefox) available [here](https://developer.mozilla.org/en/Link_prefetching_FAQ).

---

<div class="post-metadata">

**Author:** ![Thin\_Ice](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Thin\_Ice](https://boards.straightdope.com/u/Thin_Ice)\
**Post date:** [May 29, 2009, 12:02pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/13 "2009-05-29T12:02:16Z")

</div>

Yeah, I’ve set it to ask me each time before, but that quickly becomes tedious, so I don’t do it anymore, Arkcon.  
You say you noticed what Google was doing long ago, well I just noticed it a few days ago. That’s why I asked about it here.  
It is truly amazing how many cookies some sites want to install in your computer. I frequently check cookies and delete those from sites I don’t visit regularly.  
I thank all of you.

---

<div class="post-metadata">

**Author:** ![Fuzzy\_Dunlop](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@Fuzzy\_Dunlop](https://boards.straightdope.com/u/Fuzzy_Dunlop)\
**Post date:** [May 29, 2009, 12:21pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/14 "2009-05-29T12:21:22Z")

</div>

> [@Q.E.D](#):
>
> I don’t think so. Cookies don’t contain site content. What you say may happen (it’s called prefetching) but it has nothing to do with cookies.

When you write a text ad for Google AdWords you write a title, two lines, and a URL. There’s no mechanism available for delivery of a cookie. That’s in contrast to say, a more traditional banner ad. The banner ad could easily be an iframe that displays an ad but also calls code to write the cookie.

As others have said, prefetching the page calls the code on that page to save the cookie - before you actually visit it.

---

<div class="post-metadata">

**Author:** ![HorseloverFat](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@HorseloverFat](https://boards.straightdope.com/u/HorseloverFat)\
**Post date:** [May 29, 2009, 12:28pm UTC](https://boards.straightdope.com/t/how-was-cookie-installed-without-visit-to-site/497919/15 "2009-05-29T12:28:19Z")

</div>

Your browser does prefetch. It went to the site while you were staring at the google results. You can disable prefetch like so:

[http://www.technipages.com/disable-the-firefox-prefetch-setting.html](http://www.technipages.com/disable-the-firefox-prefetch-setting.html)
