Ads, Analytics and cookies...

Jorge Nerín jnerin+varnish at gmail.com
Sat Aug 9 10:28:23 CEST 2008


On Sat, Aug 9, 2008 at 00:03, Ian M. Evans <ianevans at digitalhit.com> wrote:

> Jorge Nerín wrote:
>
>  >But the parsing code is a javascript included in your page but (this
> is >important) served by their servers, so it can never be cached by
>  >varnish because the client browser ask for it directly to the third
>  >party servers.
>
> Two problems...
>
> 1) The OpenX ad server is a server you run ON YOUR OWN SITE, so even
> though the ads may be coming from another network (setting its own
> cookies) the OpenX server cookies are generated by your own domain and
> not by a third party server. It's used by sites who want to sell ads
> directly or geotarget certain ad networks to say North American or EU
> visitors. As I'm reading more about cookies today, I'm assuming having a
> CNAME of, say, an "ads" subdomain would keep the cookies off the "www."
> stuff. I'll have to check with the OpenX people.
>
> 2) The Google Analytics cookies code also sets cookies on your own domain.
>
> Reading more about cookies today than I have in the decade of my site.
> I'm a writer/photographer who has to toss on the sysadmin hat every few
> days. :-)


Yes I know about the google analytics, I use them. The way they work is
setting AND parsing the cookies using the javascript you insert in your page
with the src attribute pointing to the google analytics server. I cache
pages, images, css, javascript with these cookies set with no problems in
the analytics logs. To know if you can cache with these cookies you only
need to compare the source code of two request of the same url to your
backend server, one with cookies and one without, if it doesn't change then
it's almost safe to cache it.

I didn't know about the OpenX server, but I'm sure that you can cache pages
with add serving code that is only based in javascript loaded from an
external server (be it a third party or a subdomain of your own).

This two cookies are being put by javascript code that runs in your domain
because you put it inside your pages with a <script src=http://...> tag so
even they come from a third party server they will create and parse cookies
on your own domain.



>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>


-- 
Jorge Nerín
<jnerin at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080809/6cb6952a/attachment-0001.html>


More information about the varnish-misc mailing list