How to respect "Serve static content from a cookieless domain" page speed rule in IIS6?

Christophe Debove picture Christophe Debove · Nov 5, 2010 · Viewed 12.9k times · Source

How to respect "Serve static content from a cookieless domain" page speed rule in IIS6?

Answer

Pure.Krome picture Pure.Krome · Nov 5, 2010

To create a cookieless site (or subdomain, which is a very common best-practice) in IIS6/IIS7/IIS7.5 is simple : you need to tell the website that you are not to use cookies :) Which means in IIS terms, not to use a session.

This can be achieved in IIS6/IIS7 via two ways.

  1. Modifying the Web.config file (my personal recommendation)
  2. Using the IIS Manager GUI to find the setting and changing it.

IMPORTANT

Before you do any testing, you must must must clear all cookies (or all cookies for the domain u are testing) otherwise, they will get passed along even if u have done all the steps.

1. Via Config File

You need to define the session state to off.

<system.web>
        <sessionState cookieName="What_ever" mode="Off" />
</system.web>

NOTE: Please note that the attribute cookieless (true|false) does NOT mean 'send cookies/do not sent cookies). That's for using sessions with/without cookies ... and passes some cookie guid into the url instead (if set to true).

2. Via Gui

alt text

alt text

Hope this Helps (i assume u know how to test that no cookies are working/not working...)