title: Append domain to images
body: <p>I am developing a .net web application in c#/.net. For images on my site I am using relative paths. However to assist with performance of my site I am looking to introduce cookieless domains for images.</p>
  
  <p>In most situations I can just add the domain to the images.</p>
  
  <p>But in certain scenarios I cant and need to do it at run time. So I am looking at introducing some code to resolve the urls. I have a couple options of doing this.</p>
  
  <ol>
  <li><p>Method in base page to loop through all the controls, add append the domain to all controls that inherit for System.Web.Ui.Image and append domain if not present.</p></li>
  <li><p>Or do similar in a http module. (Is this possible)</p></li>
  </ol>
  
  <p>Will doing the above slow down my site rendering? I dont want this to be counter productive!</p>
  
  <p>Either of the above approaches should work ok for .net controls.</p>
  
  <p>But any ideas how I might append the domain to html img tag and/or any images within my stylesheets? I probably can just set the domains of the img tag in code, but not sure of the stylesheets.</p>