title: Stopping cookies being set from a domain (aka "cookieless domain") to increase site performance
body: <p>I was reading in <a href="http://code.google.com/speed/page-speed/docs/request.html" rel="nofollow noreferrer">Google's documentation</a> about improving site speed. One of their recommendations is serving static content (images, css, js, etc.) from a "cookieless domain":</p>
  
  <blockquote>
    <p>Static content, such as images, JS and
    CSS files, don't need to be
    accompanied  by  cookies, as there is
    no user interaction with these
    resources. You can decrease request
    latency by serving static resources
    from a domain that doesn't serve
    cookies.</p>
  </blockquote>
  
  <p>Google then says that the best way to do this is to buy a new domain and set it to point to your current one:</p>
  
  <blockquote>
    <p>To reserve a cookieless domain for
    serving static content, register a new
    domain name and configure your DNS
    database with a CNAME record that
    points the new domain to your existing
    domain A record. Configure your web
    server to serve static resources from
    the new domain, and do not allow any
    cookies to be set anywhere on this
    domain. In your web pages, reference
    the domain name in the URLs for the
    static resources.</p>
  </blockquote>
  
  <p>This is pretty straight forward stuff, except for the bit where it says to "<strong>configure your web server to serve static resources from the new domain, and do not allow any cookies to be set anywhere on this domain</strong>". <a href="https://stackoverflow.com/questions/956458/how-do-i-setup-iis-with-a-cookieless-domain-to-improve-performance/956586#956586">From what I've read</a>, there's no setting in IIS that allows you to say "serve static resources", so how do I prevent ASP.NET from setting cookies on this new domain?</p>
  
  <p>At present, even if I'm just requesting a .jpg from the new domain, it sets a cookie on my browser, even though our application's cookies are set to our old domain. For example, ASP.NET sets an ".ASPXANONYMOUS" cookie that (as far as I'm aware) we're not telling it to do.</p>
  
  <p>Apologies if this is a real newb question, I'm new at this!</p>
  
  <p>Thanks.</p>