title: Replacing cache control using web.config with new value
body: <p>I have an asp.net website which is sending by default the following cache in the header:</p>
  <p>Cache-Control: private</p>
  <p>I would like to change Cache-Control to:</p>
  <pre><code>no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
  </code></pre>
  <p>However, when I add the following to the web config:</p>
  <pre><code>&lt;system.webServer&gt;
  &lt;httpProtocol&gt;
  &lt;customHeaders&gt;
  &lt;remove name=&quot;Cache-Control&quot; /&gt;
  &lt;remove name=&quot;Pragma&quot; /&gt;
  &lt;remove name=&quot;Expires&quot; /&gt;
  &lt;add name=&quot;Cache-Control&quot; value=&quot;no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0&quot; /&gt;
  &lt;add name=&quot;Pragma&quot; value=&quot;no-cache&quot; /&gt;
  &lt;add name=&quot;Expires&quot; value=&quot;0&quot; /&gt;
  &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  <p>It still sends the &quot;private&quot; string in the Cache-Control header to the client:</p>
  <pre><code>Cache-Control
  private,no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
  </code></pre>
  <p>You can notice how it does not even place a space after &quot;private&quot;, it is still adding it to the beginning of the response.  How can I remove the &quot;private&quot; from Cache-Control using the web.config?  Thanks before hand.</p>